Code Snippets

How to create an “enrolled courses” submenu in LearnDash

Learn how to create an “enrolled courses” submenu in LearnDash! Due to how WordPress themes work, some code tweaking may be required.

How to limit students to 5 lessons per month in LearnDash

A rather large code snippet (200+ lines) that enables LearnDash lesson/topic view tracking and limitation, with more views allowed monthly.

How to have a word count limit on your LearnDash essays

In this tutorial, we’ll show you how to add a word counter to your LearnDash essay questions, and also how to impose a word limit on those questions.

Show the original price and the discounted price on a LearnDash course page

In this tutorial, we show you how to customize the LearnDash course infobar to show an “original price” with a line through it, next to the discounted price.

Timezone-adjusted release date and time display for LearnDash lesson schedule

In this “tutorial” we basically just give you a PHP snippet that helps format Lesson Schedule release dates and times for the user’s local time zone.

How to display lesson duration in LearnDash without literally writing [1:23] in your titles

In this tutorial, we’ll show you how to stylishly let students know how long a lesson or topic is going to take, before they jump in!

How to make a shortcode to display a LearnDash course price (FREE code snippet!)

In this “tutorial” we basically just give you a PHP code snippet that registers a [lmscoder-course-price id=”123″] shortcode.

How to add LearnDash code snippets to your site (without breaking it)

In this tutorial, we will go over how to identify the two most common “snippet languages” which are PHP and CSS, and how to add such snippets to your site.