LDX Design

LearnDash Design & Tutorials

LearnDash Design & Tutorials

The Complete List of LearnDash Shortcodes and How to Use Them

LearnDash comes pre-packaged with a ton of shortcodes you can use to display various information. Many LearnDash shortcodes also come with a handful of options to customize how and which information is display.

If you’re using WordPress 5.0’s new content editor, all of these shortcodes have been transformed into LearnDash blocks, so you can insert them using Gutenberg.

Here is your comprehensive list of all LearnDash shortcodes (including Uncanny Owl shortcodes), along with how to use them.

Table of Contents

LearnDash Blocks in WordPress 5.0+
Every LearnDash shortcode listed below is also available as a block in WordPress 5.0’s new editor (aka: Gutenberg). Look for “LearnDash LMS Blocks” when adding a new block.

SEE ALSO: What is a shortcode? 🤔

📘 LearnDash Shortcode Reference

Here’s a complete list of every available LearnDash shortcode. Click on a shortcode to view instructions for use & accepted parameters.

Shortcode Description
Main LearnDash Shortcodes
Included with the default installation of LearnDash
[ld_profile] Displays basic user information (name, avatar, etc.), as well as course points, a list of enrolled courses, quiz results & certificates earned.
[ld_user_course_points] Displays the earned course points, for that user, on any page.
[learndash_course_progress] Displays a progress bar with the user’s progress for that course.
[ld_course_list] Displays a list of courses. Many options are available to filter & customize the output. When the Course Grid add-on is enabled, it will display courses in a grid layout.
[ld_lesson_list] Similar to [ld_course_list] but displays a list of lessons. Also works with the Course Grid add-on.
[ld_topic_list] Similar to [ld_course_list] but displays a list of topics. Also works with the Course Grid add-on.
[ld_quiz_list] Similar to [ld_course_list] but displays a list of quizzes. Also works with the Course Grid add-on.
[course_content] Displays a complete list of lessons, topics & quizzes associated with that course.
[user_groups] Displays the list of groups users are assigned to as either users or leaders.
[ld_course_expire_status] Displays the expiration date of a course for the current student. Include a message before and/or after the date (optional).
[ld_video] Displays a video anywhere within a lesson or topic page. You must be using video progression for this shortcode to work.
[learndash_payment_buttons] Displays the payment button for a particular course, anywhere on the page. A course ID is recommended.
[ld_course_info] Displays a list of registered courses, course progress details & all quizzes the user has taken. A few options are available for customization.
Conditionally Display Content
Show/Hide specific content for certain users or groups
[visitor] Displays content if a student is NOT enrolled in a course. Requires a closing [/visitor] tag.
[student] Displays content if a student IS enrolled in a course. Can also be used to display content to individual students (based on user id). Requires a closing [/student] tag.
[course_notstarted] Displays content if a student has access to a course, but has not completed any steps. Requires a closing [/course_notstarted] tag.
[course_inprogress] Displays content if a student has access to a course, has completed at least one step, but has not finished the entire course. Requires a closing [/course_inprogress] tag.
[course_complete] Displays content if a student has fully completed a course. Requires a closing [/course_complete] tag.
Certificate Shortcodes
Only used when creating LearnDash certificates
[usermeta] Displays information about the student, such as first name, last name or email address.
[courseinfo] Displays various course info like the course title, completion date, points earned, etc.
[quizinfo] Displays various quiz info like the quiz title, timestamp, score, points awarded, etc.
Uncanny Owl Toolkit Shortcodes
Shortcodes available when using the Uncanny Owl Toolkit plugin
Available in Free Version
[uo_login] Adds a login form to any page.
[uo_login_ui] Replaces the default wp-login.php login page.
[uo_login_link]
[uo_logout]
[uo_loginout]
[uo_register]
Displays either a link to log in, a link to log out, a link that displays “Log In” or “Log Out” depending on the user’s logged in status, or a link to the register page. Also enables adding login or logout links to menus.
[uo_breadcrumbs] Displays a breadcrumb trail with proper Course > Lesson > Topic hierarchy.
[uo_learndash_resume] Displays a button that takes the user back to their most recently visited course, lesson, topic or quiz page.
[uo_course_resume] To be used on course pages, this displays a button that takes the user back to their most recent lesson, topic or quiz in a particular course.
[uo_learndash_certificates] Displays a list of certificates the user has earned.
[uo_show] Show or hide content based on whether a user is logged in or out.
Available in Pro Version
[uo_expiration_in] Displays the number of days until a course expires for that user.
[uo_courses] Displays courses in an enhanced grid view. This is similar to the official Course Grid add-on from LearnDash, but with different features.
[uo_lessons_topics_grid] Displays lessons/topics in a grid view (instead of list view).
[uo_dashboard] Displays an enhanced version of the [ld_profile] shortcode.
[uo_group_status]
[uo_group_organization]
Enable users to register themselves directly into LearnDash groups, and to switch groups from the front end. Requires setup.
[uo_group_logo]
[uo_group_list]
Show group logo(s) and group name(s) for the user currently logged in.
[uo_group_login_redirect_url]
[uo_group_login_redirect_link]
Added in version 3.0.1
[uo_transcript] Displays a printable LearnDash transcript for the current user.
[uo_time]
[uo_time_course_completed]
Tracks time users spend in courses. Display total time spent or time until course completion. Enables blocking access to quizzes until minimum time spent in course.
Uncanny Owl Groups Plugin Shortcodes
Shortcodes available when using the Uncanny Owl Groups plugin
[uo_groups_redemption_form] Adds a single field redemption form for enrollment keys, to be used on pages or in widgets, with existing users.
[uo_groups] The group management page provides all the functionality for group leaders to manage their own groups.
[uo_groups_course_report] The group leader report (which can also be accessed from the group management page) allows group leaders to view progress reports of their group members.
[uo_groups_registration_form] The groups registration page is a custom registration page you can use when inviting users to join a group and redeem an enrollment code.
[uo_groups_quiz_report] The Group Leader Quiz Report allows Group Leaders to view quiz reports of their group members.
[uo_groups_buy_courses] The buy courses page allows group leaders and new customers to purchase courses and create new groups directly. This page is only auto-generated if you activate the plugin after WooCommerce is installed and active.
[uo_groups_restrict_content] Allows for the creation of targeted messaging for logged in group members on pages and posts, based on group ID.
[uo_groups_url] Adds a button to the site for logged in group leaders and links them to the group management page. By default, the button text will be “Group Management,” but you can customize this.
Uncanny Owl Codes Plugin Shortcodes
Shortcodes available when using the Uncanny Owl Codes plugin
[uo_code_registration] Adds a very basic registration form to the page that includes a code redemption field.

👩‍💻 How to Use LearnDash Shortcodes

Let’s talk about how to use the main LearnDash shortcodes. We’ll also explore all the options (called parameters) you can use to customize each shortcode.

[ld_profile]

The [ld_profile] shortcode can be used to build a student profile. By default, it will output the following information related to the currently logged-in user:

  • Name
  • Username
  • Email address
  • Course points
  • Avatar (profile image)
  • List of registered courses, which includes:
    • course progress
    • links to download certificates
    • quizzes taken, along with date, scores & statistics
    • completed/not completed status checkmark

LearnDash ld_profile shortcode example

The default [ld_profile] shortcode

You can also use links at the top to quickly expand/collapse all registered course information.

The design is a little bland, but you can spice it up with the Design Upgrade Pro plugin. This plugin also gives you the ability to:

  • expand all courses by default
  • remove profile information (just show registered courses)
  • remove quiz information
  • hide the “edit profile” link
  • hide the status checkmarks (just show progress bar)

[ld_user_course_points]

You likely won’t find many uses for the [ld_user_course_points] shortcode, but it could be used to build your own student profile page using a page builder (like Beaver Builder or Elementor).

You simply insert [ld_user_course_points] onto its own line, and you will get the following output:

Earned Course Points: 100

This will display the total, cumulative points that the current user has received. The name is a little confusing, as this includes both “earned” course points (from completed courses & quizzes), as well as any “extra” course points you’ve assigned to the user via their WordPress profile.

There is only one parameter, but you probably won’t need it. You can insert a specific user ID, like this:

[ld_user_course_points user_id="5"]

This would show the course points for the user with an ID of 5. You’ll most likely want to leave out the user_id parameter. The default usage will automatically show points for the logged in user.

[learndash_course_progress]

The [learndash_course_progress] shortcode displays a progress bar with the current user’s progress for that course.

learndash_course_progress bar shortcode example

An example progress bar using the [learndash_course_progress] shortcode

It must be used on a course, lesson, topic or quiz page, and it automatically detects 1) which course is currently being accessed, and 2) which user is logged in. It’s smart like that 🧠. Using it on any other page will render nothing.

You’ll typically use the default [learndash_course_progress] shortcode without any parameters, but there are two you can use:

  • [learndash_course_progress user_id="5"] – Displays the progress for a specific user
  • [learndash_course_progress course_id="12"] – Displays the progress for a specific course

This shortcode works great with page builders when building a custom layout for your courses, lessons & topics. To easily customize the design of the progress bar, check out Design Upgrade Pro for LearnDash.

[ld_course_list]

The [ld_course_list] shortcode displays a list of courses, and it comes with A TON of parameters to customize which courses are shown and how they are laid out. By default, the list of courses is poorly designed, so you’ll most likely want to use this shortcode along with the Course Grid add-on.

LearnDash ld_course_list shortcode with grid

Example of [ld_course_list] when combined with the course grid add-on.

Because of this shortcode’s long list of options, we have an entire article dedicated to it. Please check out our comprehensive overview of the LearnDash Course Grid add-on.

[ld_lesson_list]

[ld_lesson_list] works in much the same way as [ld_course_list], only it displays lessons instead of courses. Here’s an example of it in use:

LearnDash ld_lesson_list shortcode with grid

This shortcode would be best used on a course page, instead of using the default course content table. Be sure to upload a featured image for each lesson to replace the placeholder images.

[ld_topic_list]

[ld_topic_list] works in much the same way as [ld_course_list], only it displays topics instead of courses. Here’s an example of it in use, along with options to hide the title & description, and show the topic dropdown filter.

LearnDash ld_topic_list shortcode with grid

This shortcode would be best used on a lesson page that contains at least a few topics. A featured image will also replace these placeholder images.

[ld_quiz_list]

[ld_quiz_list] works in much the same way as [ld_course_list], only it displays quizzes instead of courses. If your course offers more than just a few quizzes, you might find this shortcode useful.

Typically, however, quizzes are best displayed either…

  • in the course content table, along with the course they are associated with,
  • in the course navigation widget, wherever they fall in the natural course progress, or
  • at the bottom of a lesson or topic page that the quiz is assigned to

[course_content]

The [course_content] shortcode is an exact replica of the default course content table that is displayed on course pages by default (below any content you add). It displays a complete overview of the course, along with the user’s progress. In it, you’ll find all…

  • lessons
  • topics
  • quizzes

…that are assigned to the course. There are also expand/collapse links at the top to show/hide topics & quizzes that are tied to lessons, as well as a “Status” column that displays the user’s status for that particular lesson/topic/quiz.

LearnDash course_content shortcode example

There are two really valuable use cases for this shortcode:

When using this shortcode on any other page besides a course page, you’ll need to use the course_id parameter. This tells LearnDash which course you want to display content for.

[course_content course_id="12"]

This would display the course content table for the course with an ID of 12.

Related: How to find the LearnDash course ID

Links in the Course Content Table

The course content table functions differently for users, depending on whether or not they have access to the course.

  • If a user HAS access to the course, all the lesson/topic/quiz links will go directly to their respective pages
  • If a user DOES NOT have access to that course, all the links will redirect back to the course page

[user_groups]

The [user_groups] shortcode displays the list of groups that a user is assigned to. There is very little information about this shortcode, and I have not tried it myself yet.

[ld_course_expire_status]

This shortcode will display the date in which a course expires for the currently logged in user. You must enable the “Expire Access” setting on the course edit screen for this to work.

Course access will expire on: December 31, 2019

If used on a course page, [ld_course_expire_status] will automatically detect the course, and the user, and display a message. The default messages are as follows:

  • If a course expires in the future: “Course access will expire on: {date}”
  • If a course has already expired: “Course access expired on: {date}”

You can customize the message & the date using the following parameters:

label_before

This changes the message used before the course expires.

[ld_course_expire_status label_before="This course will expire on the following date:"]

label_after

This changes the message used after the course has expired.

[ld_course_expire_status label_after="Sorry, but this course expired on:"]

format

This changes the format of the date used. By default, LearnDash will use your WordPress date settings. See a full list of date formatting options here.

[ld_course_expire_status format="F j, Y"]

You can also use the course_id & user_id parameters, although you will likely not need them because LearnDash identifies these automatically.

Here’s an example of all parameters used together:

[ld_course_expire_status format="F j, Y" label_before="This course will expire on the following date:" label_after="Sorry, but this course expired on:" course_id="12" user_id="5"]

[ld_video]

The [ld_video] shortcode is only used if you’re using LearnDash’s built-in Video Progression feature. This must be enabled on the lesson or topic page in order for it to work, and a URL to your video must be entered.

By default, LearnDash places the your video either above or below the course content (you choose which one). However, if you want to place the video somewhere in the middle of your content, you would use the [ld_video] shortcode.

There are no parameters. Simply add [ld_video] anywhere within your course content (must be on its own line).

This is also great for use with page builders when customizing the layout of your lesson/topic pages. You have complete control of where to include your video.

[learndash_payment_buttons]

The [learndash_payment_buttons] shortcode should only be used if you’re utilizing the default LearnDash payment methods (Stripe or PayPal). If you’re using WooCommerce, MemberPress, or any other platform to process payment, this shortcode will not work.

By default, if your course is set to any other status except for “Open,” you’ll typically see a “Take This Course” button appear at the bottom of your content, on the course page. If you’re using one of LearnDash’s default payment methods, this button will begin the payment/checkout process for the user.

LearnDash payment buttons shortcode example

Curious how I got my button to look so cool? This is how.

If you want to place this button somewhere else on your page (i.e. if you’re using a page builder to create a custom course landing page), you can use the [learndash_payment_buttons] shortcode to insert the button anywhere.

You’ll want to be sure to include the course_id, like this:

[learndash_payment_buttons course_id="12"]

[ld_course_info]

The [ld_course_info] shortcode could be used to help build a student profile, but most people prefer the [ld_profile] shortcode over this one. They are quite different in the type of info they display. This shortcode displays 3 things:

  • list of registered courses, along with a thumbnail image
  • list of course progress details, which includes:
    • course status: Not Started, In Progress or Completed
    • X out of Y steps completed
    • the date you started the course
  • list of quizzes you’ve taken, which includes:
    • quiz name & link to quiz page
    • score
    • points awarded
    • link to statistics
    • date you took it
    • grading status

Here’s what the registered courses looks like when you’ve included a featured image:

ld_course_info registered courses

Here’s an example of the course progress information:

ld_course_info progress details

And here’s the quiz information:

ld_course_info quiz details

The output of these examples was enhanced by the free Design Upgrade for LearnDash plugin.

NOTE: The output might differ slightly depending on which theme you’re using.

You can use any of the following parameters to customize the output of [ld_course_info] (or use a bunch of them together):

  • show_thumbnail – set to “true” to show the thumbnail, or “false” to hide it
  • registered_num – limits the number of courses displayed
  • registered_orderby – order the registered courses by ID, title, date and more
  • registered_order – set to either ascending (“ASC”) or descending (“DESC”)
  • progress_num – limits the number of courses displayed in the progress section
  • progress_orderby – order courses in the progress section by ID, title, date and more
  • progress_order – set to either ascending (“ASC”) or descending (“DESC”)
  • quiz_num – limit the number of quizzes displayed
  • quiz_orderby – order quizzes by ID, title, date and more
  • quiz_order – set to either ascending (“ASC”) or descending (“DESC”)

You can also specify a user_id, but you will likely just let LearnDash automatically assign it to the current user.


Conditionally Display Content

These shortcodes are also provided with the default LearnDash plugin, but they work a little differently than the ones above. These help you show or hide specific information for certain users, based on their status.

You can include HTML, images, video or anything else you’d like inside of these shortcodes.

All of these shortcodes require a beginning [shortcode] and an ending [/shortcode], with content in the middle. Be sure to include both.

[visitor]

You can use the [visitor] shortcode to only show certain information to students who are not yet enrolled in a course. It is most commonly used on the course page itself, but can also be used on a custom sales page by specifying a course_id. Here’s an example:

[visitor course_id="12"]
This will only be seen by people who DO NOT have access to the course. You could provide a link to a signup form or email capture here.
[/visitor]

[student]

Use this shortcode to only display some content to a student who has access to the course.

[student course_id="12"]
This will only be seen by people who HAVE ACCESS to the course.
[/student]

You could also add a user_id parameter to the [student] shortcode if you wanted to target a specific student by his or her ID.

[student user_id="5"]
This will only be seen by the user whose ID is 5. No other students will see it.
[/student]

[course_notstarted]

This shortcode will show content to those who have not completed any steps in the course thus far.

[course_notstarted course_id="12"]
This will only be seen by people who have not completed any steps in the course yet. You could provide a message encouraging them to get started.
[/course_notstarted]

[course_inprogress]

The [course_inprogress] shortcode shows content to a student who has started the course, but not yet finished it.

[course_inprogress course_id="12"]
This will only be seen by people who have started the course (completed at least one step), but not yet finished it. You could provide encouragement for them to finish it soon.
[/course_inprogress]

[course_complete]

Use the [course_complete] shortcode to show content only to students who have fully completed a course (completed all steps & passed all required quizzes).

[course_complete course_id="12"]
This will only be seen by people who have fully completed the course. You could provide a link to a certificate here, or some related courses they might want to try next.
[/course_complete]

🏆 LearnDash Certificate Shortcodes

The shortcodes in this section apply when you’re creating LearnDash certificates. You would not typically use them on a course, lesson or topic page.

  • [usermeta] displays user info
  • [courseinfo] displays course info
  • [quizinfo] displays quiz info

[usermeta]

The [usermeta] shortcode has a handful of options to display user information. Let’s take a look at each one.

  • [usermeta field="first_name"] – Displays a user’s first name
  • [usermeta field="last_name"] – Displays a user’s last name
  • [usermeta field="display_name"] – Displays a user’s full display name, which is often a combination of {first_name} and {last_name}. (might not be captured upon user signup)
  • [usermeta field="user_login"] – Displays a user’s username
  • [usermeta field="nickname"] – Displays a user’s nickname (might not be captured upon user signup)
  • [usermeta field="user_email"] – Displays a user’s email address
  • [usermeta field="user_url"] – Displays a user’s website address (likely not captured upon user signup)
  • [usermeta field="description"] – Displays a user’s bio (likely not captured upon user signup)

By far, the most common [usermeta] shortcodes you’ll use are [usermeta field="first_name"] and [usermeta field="last_name"], as almost all certificates should include the student’s name.

NOTE
Not all of these values are collected when a student registers for or purchases a course. Different registration methods collect different info.

Check with your ecommerce or checkout solution to see which fields are collected upon signup. You can also check this yourself by going to Users > All Users, and clicking on a user to edit their profile.

[courseinfo]

The [courseinfo] shortcode should only be used for certificates assigned to a course. One quick note before I list out all the options:

  • aggregate refers to the sum of all quizzes assigned to the course
  • cumulative refers to the average of all quizzes assigned to the course

Here are all the possible values:

  • [courseinfo show="course_title"] – Displays the course title
  • [courseinfo show="course_points"] – Displays the total available points for the course
  • [courseinfo show="user_course_points"] – Displays the amount of points the user earned for the course
  • [courseinfo show="completed_on"] – Displays the date the course was completed
  • [courseinfo show="cumulative_score"] – Displays the average score for all graded parts of the course
  • [courseinfo show="cumulative_points"] – Displays the average points earned
  • [courseinfo show="cumulative_total_points"] – I’m not sure how this differs from the previous option
  • [courseinfo show="cumulative_percentage"] – Displays the average percentage of all quizzes taken in the course
  • [courseinfo show="cumulative_timespent"] – Displays the average time spent on each part of the course
  • [courseinfo show="aggregate_score"] – Displays the final score received for the course
  • [courseinfo show="aggregate_points"] – Displays the total points earned for the course
  • [courseinfo show="aggregate_total_points"] – I’m not sure how this differs from the previous option
  • [courseinfo show="aggregate_percentage"] – Displays the total percentage score for all quizzes taken as part of the course
  • [courseinfo show="aggregate_timespent"] – Displays the total time spent on the entire course as a whole

When using the completed_on parameter, you can also customize the date format. (See available date formats)

[courseinfo show="completed_on" format="F j, Y"]

[quizinfo]

The [quizinfo] shortcode should only be used for certificates assigned to a quiz. They will not work if used for a certificate assigned to a course.

Here’s a list of all available options to output quiz information on a quiz certificate:

  • [quizinfo show="score"] –  Displays the score received for that quiz
  • [quizinfo show="count"] – Displays the number of times the quiz was attempted
  • [quizinfo show="pass"] – Displays the score required in order to pass the quiz
  • [quizinfo show="timestamp"] – Displays the day/time when the quiz was completed
  • [quizinfo show="points"] – Displays the points received by the user on the quiz
  • [quizinfo show="total_points"] – I’m not sure how this differs from above
  • [quizinfo show="percentage"] – Displays the percentage grade received by the user on the quiz
  • [quizinfo show="quiz_title"] – Displays the name of the quiz
  • [quizinfo show="course_title"] – Displays the name of the course that the quiz is associated with
  • [quizinfo show="timespent"] – Displays the time spent taking the quiz

Just like above, you can customize the date format when using the timestamp option.

[quizinfo show="timestamp" format="F j, Y"]

🦉⚙ Uncanny Owl Toolkit Shortcodes

[uo_login]

Simply add this shortcode to display a login form on any page.

[uo_login]

There are no parameters, but there is one variation you can use to make it a little more user-friendly. If a user is already logged in, they will see the message you include between the [uo_login] and [/uo_login] tags.

[uo_login]You are already logged in.[/uo_login]

[uo_login_ui]

The [uo_login_ui] is similar to [ui_login], but it’s a little more intense. It completely replaces WordPress’ default wp-login.php page. It is different in the following ways:

  • If you plan to use Uncanny Owl’s user verification feature, you must use this shortcode
  • It requires you to specify the page you’re using the shortcode on, in the Uncanny Owl Toolkit settings
  • It sets up a redirect for wp-login.php, which means you can no longer access the default WordPress login page (this could potentially lock you out of your site if you don’t set it up correctly)

See Uncanny Owl’s documentation for full setup instructions.

There are actually 4 different types of shortcodes you can use here, but they are all for adding login and logout links to your site.

  • [uo_login_link] – always displays a link to your login page
  • [uo_logout] – always displays a link that will log a user out
  • [uo_loginout] – displays a login link to signed-out users & a logout link to signed-in users (most commonly used)
  • [uo_register] – displays a link to your registration page (which you need to set up with some other tool)

The other nice thing about this feature is that you add any of these links to your WordPress menus.

  1. Navigate to Appearance > Menus
  2. Look for “Uncanny Menu Links”
  3. Check the box next to the one you want to add
  4. Click “Add to Menu”

Again, the Log In / Log Out is the one I’d recommend in most cases.

Uncanny Owl Toolkit Menu Links

[uo_breadcrumbs]

With the [uo_breadcrumbs] shortcode, you can add breadcrumbs to any post, page or widget area. By default, your breadcrumbs are output in this format:

Home > {Course Archive Page} > {Course} > {Lesson} > {Topic}

If you’re using the Course Grid add-on, or any other custom course archive, you can change the {Course Archive Page} to any page you’d like. You can also customize the “>” breadcrumb separator, as well choose to include the current page. These options are available in the Toolkit settings.

And yes, you can even use emojis for your separators! 😍

Uncanny Owl Toolkit Breadcrumb Settings

Adding the shortcode to the top of every course, lesson & topic page can be incredibly time-consuming. Try modifying your template files and using some PHP code to output the shortcode instead:

<?php echo do_shortcode( '[uo_breadcrumbs]' ); ?>

[uo_learndash_resume]

This shortcode will insert a button that takes the student back to the last piece of LearnDash content that they accessed (whether it was a course, lesson, topic or quiz page).

[uo_learndash_resume] should only be shown to logged-in users, so it’s recommended you either place it on a page that sits behind a login, or use the [student] shortcode:

[student][uo_learndash_resume][/student]

NOTE
This should only be used on a page other than a course, lesson, topic or quiz page. Using it on one of those pages will make it redirect back to itself.

[uo_course_resume]

This is a variation of the previous shortcode. When you use [uo_course_resume], it will take you back to the lesson, topic or quiz of that particular course. So you would typically use this shortcode on a course page, allowing the student to jump right back into the course where they left off.

The course_id parameter is required.

[uo_course_resume course_id="12"]

[uo_learndash_certificates]

This shortcode can be used on any post, page or sidebar widget to display a list of certificates that the current user has earned. They will be displayed in reverse chronological order.

You can optionally include a CSS class and/or title for styling purposes.

[uo_learndash_certificates class="some-class" title="some-title"]

[uo_show]

The [uo_show] shortcode can be used to show content to users based on whether or not they are logged in. Unlike the [student] and [visitor] shortcodes (which are actually based on course enrollment status), [uo_show] just checks if a user is logged in.

This is great for “Open” courses, where you might want to show a free registration or signup link, or some bonus material to users who are already signed up.

To display content to users who are logged in:

[uo_show for="loggedin"]Some content here[/uo_show]

To display content to users who are logged out:

[uo_show for="loggedout"]Some content here[/uo_show]

[uo_expiration_in]

[uo_expiration_in] displays the actual number of days left until a course expires. By default, it will display:

“Course Access Expires in X days.”

You can customize the message by using the pre-text parameter:

[uo_expiration_in pre-text="Access expires in:"]

On the last day of access, number of days will be “0.” If the course has expired for the user, nothing will be displayed.

[uo_courses]

[uo_courses] is an incredibly powerful shortcode with a lot of options. It’s similar to the LearnDash Course Grid add-on, but more designed for logged-in users. It will display an enhanced course grid. There’s a long list of parameters to customize the output.

For more information, checkout the official documentation.

[uo_lessons_topics_grid]

This is similar to the [uo_courses] shortcode, but it displays a grid of lessons & topics instead of courses. It uses some basic logic:

  • If placed on a course page, it displays the lessons in that course
  • If placed on a lesson page, it displays the topics in that lesson

It has its own set of parameters, which can be found here.

[uo_dashboard]

This shortcode is similar to the [ld_profile] shortcode, only it doesn’t show the basic user information at the top. It just displays a list of registered courses, but includes even more info than [ld_profile].

[uo_dashboard] displays:

  • all registered courses, along with status, progress bar & percent complete
  • all lessons, topics & quizzes associated with each course

The big advantage to using [uo_dashboard] over [ld_profile] is that you can navigate directly to a lesson or topic right from the page.

[uo_group_status]

[uo_group_status] and [uo_group_organization] are both tied to Uncanny Owl Toolkit Pro’s Group Registration module. It’s a bit complex, and we recommend you read the documentation and watch the YouTube video, which explains how to set it up.

[uo_group_logo] gives you the ability to upload a logo for a group, and display the logo somewhere on your site using the shortcode. If you sell courses to many organizations, and use groups to manage them, you can use this to customize the experience for each organization.

Uncanny Owl Toolkit Group Logo

The size parameter is optional, but can be used to change the size of the image:

[uo_group_logo size="thumbnail"]

[uo_group_list] is another useful shortcode for managing organizations. It will output the group name that a user belongs to. If the user belongs to more than one group, all groups will be displayed.

A comma is used to separate each group name, but you can customize it using the separator parameter:

[uo_group_list separator=" - "]

Full documentation »

[uo_transcript]

The [uo_transcript] shortcode generates a printable transcript for the current user. It’s an easy way for students to see a consolidated view of their overall course progress.

There are a few options you can customize in the Toolkit’s settings:

  • logo
  • primary UI color
  • primary text color
  • accent UI color
  • accent text color

We recommend you create a dedicated page for transcripts. There are no parameters for this shortcode. You simply use [uo_transcript].

Full documentation »

[uo_time]

[uo_time] and [uo_time_course_completed] are available when you have turned on the Simple Course Timer module in Uncanny Owl Toolkit Pro. The Course Timer is quite powerful, so I encourage you to read the documentation & watch the video here.

user-id & course-id are available, but optional. In most cases, you won’t need them.

  • [uo_time] – Displays the total spent in the course. This includes all time on course, lesson, topic & quiz pages, as well as time spent after the user has already completed the course. Think of it as total cumulative time.
  • [uo_time_course_completed] – Displays the time it took for the user to complete the course. Once the course is completed, any additional time spent in the course is not included. No value is shown until after the user completes the course.

🦉👨‍👩‍👧‍👦 Uncanny Owl Groups Shortcodes

These shortcodes are available when using the Uncanny Owl Groups plugin.

Coming soon…


🦉🎟 Uncanny Owl Code Shortcodes

These shortcodes are available when using the Uncanny Owl Codes plugin.

[uo_code_registration]

This shortcode adds a very basic registration form to your page that includes a code redemption field. There are 4 parameters you can use to customize the form:

  • redirect – Redirects the user to the specified URL after they submit the form
  • code_optional – Specifies whether or not the registration code is optional or required. Accepts either yes or no. Default is no.
  • auto_login – Specifies whether or not the user should automatically be logged in on form submission. Accepts either yes or no. Default is yes.
  • role – Specifies the new user’s role. Defaults to subscriber. You could also use group_leader or any other WordPress role.

Here’s an example using all of the available options:

[uo_code_registration redirect="https://yoursite.com/dashboard/" code_optional="yes" auto_login="no" role="subscriber"]

More coming soon…


Are there any LearnDash shortcodes that I left out? Do you use a LearnDash plugin that creates its own shortcodes? Please let me know in the comments so I can keep this up to date.

Previous

How to Use & Customize the LearnDash Course Grid

Next

How to Find the LearnDash Course ID

6 Comments

  1. Hello

    Congratulations on the beautiful post.
    I see that for the course pages we have great shortcuts, but I think there are shortcuts to the lesson pages and topics. For example, as I do not have experience with complicated codes, I can not make a more compelling lesson page.
    Everything would change if I had a shortcut to put on the lessons page, [mark lesson as completed].
    Would you know of any code to do this?
    Thank you and sorry for my English

    • Hi João — Thanks for the kind words about the post. I worked hard on it 🙂

      Unfortunately, there is no shortcode for the “mark as complete” button. LearnDash does provide a way to create a more compelling lesson page, move things around, etc., but it does require some coding knowledge. You’d have to understand HTML, CSS and PHP code in order to do it.

  2. Thanks for the reply, my feeling is that the creators of learndash do not give due importance to the lesson pages. I have already tested many topics and the layout of the lessons are unpleasant, except the learnmate theme which is very expensive compared to other similar themes.
    Another problem I see is lack of compatibility between Learndash and the page builders mainly the ELEMENTOR.

    • João — I hear ya loud and clear. That’s why I’m building a LearnDash theme that will try to solve those issues for you. It will pay special attention to laying out the course, lesson, topic & quiz pages, as well as be compatible with Elementor & Beaver Builder.

      It’s going to take some time to build, but I have started it. I’ll keep ya posted.

  3. ayham

    Hey Dave,

    Thanks for this helpful post. Have you had any luck using the [visitor] shortcode? I am trying to use it on a sales page but I cannot get it to work. For example, say I am creating a sales page for a course with id = 45, I enter the shortcode as follows

    [visitor course_id = “45”]

    However, the course content is not displayed. My assumption is that if I enter this code, the user will see the course lesson list, but will not be able to access the course unless the visitor pays for it. I can enter text as you instructed above.

    [visitor course_id=”45]hello visitor[/visitor]

    in which case it works.

    It seems that this is all that shortcode does, a message only for visitor who have not signed up for a certain course, in which case I must also use a payment button (with the same course id) on the page.

    Am I right?

    Thanks!

    • Hey Ayham,

      You are correct in that the [visitor] shortcode works for your own custom content, but it doesn’t work for the course contents. The course content table is output dynamically by LearnDash, and you can’t modify its visibility or contents with a shortcode.

      There is a course setting to “Hide Course Content Table,” and that will hide it for users who are NOT enrolled. But it will always show if the user is enrolled in the course.

      There are custom code options to modify it, like customizing LearnDash template files, but that is a more advanced technique that requires some knowledge of HTML & PHP code.

Leave a Reply

Your email address will not be published. Required fields are marked *

Powered by WordPress & Theme by Anders Norén