LearnDash offers a variety of shortcodes that allow you to easily add content to any page, course, lesson, or quiz. Additionally, you can customize the display of your certificates using specific shortcodes.
To access the shortcodes, navigate to:
Dashboard >> LearnDash LMS >> Courses >> Course Shortcodes
and
Dashboard >> LearnDash LMS >> Certificates >> Certificates Shortcodes
You can try out the LearnDash shortcodes in the Live Admin LearnDash Demo to see how they work in action.
To use a shortcode, simply create a new page and insert the desired shortcode to display the content as needed.
Discover LearnDash Shortcodes for…
LearnDash Profile, Login option, payment buttons, and much more
Here is a complete list of all available LearnDash shortcode options.
[ld_quiz_list] | Shows the list of quizzes. | |
[ld_profile] |
Shows the courses a user is enrolled in, quiz scores, progress in courses, and earned certificates. |
|
[ld_course_list] |
Displays a list of courses. You can use this shortcode on any page if you prefer not to use the default /courses page. |
|
LearnDash Course List Order | [ld_course_list order=”ASC”] |
Displays the list of courses in both descending and ascending order. |
LearnDash Course List Num | [ld_course_list num=”15″] |
Displays a progress bar indicating the user’s advancement in that course. |
[ld_course_list tag=”java”] | Displays courses that have the specified tag (e.g., Java). | |
[learndash_course_progress] |
Displays the course points earned by the user on any page. |
|
[ld_user_course_points] |
Displays a limited number of courses. |
|
[ld_user_course_points user_id=”7″] |
Display the course points for the user with the ID of 7. |
|
[course_content course_id=”25″] |
Displays the list of lessons, topics, and quizzes for the specified courses. |
|
[ld_lesson_list] |
Displays a list of lessons. You can use this shortcode on any page. |
|
[ld_lesson_list num=”20″] |
Limits the number of lessons displayed. |
|
LearnDash Lesson List Order | [ld_lesson_list order=”ASC”] |
Displays the list of lessons in both ascending and descending order. |
[ld_lesson_list tag_id=”10″] |
Displays lessons that have the specified tag. |
|
[ld_topic_list] |
Displays a list of topics. This shortcode also functions with the Course Grid add-on. |
|
LearnDash Course Content | [course_content] |
Displays the full list of lessons, topics, and quizzes associated with that course. |
LearnDash Visitor | [visitor] |
Displays content within the shortcode exclusively to users who have not yet enrolled in the current course. |
[course_complete] |
Displays the content if the user has finished the course. |
|
[course_inprogress] |
Displays the content if the user has begun but not finished the course. |
|
[course_notstarted] |
Displays the content if the user has access to the course but has not yet started it. |
|
[student] |
Displays the content if the user is enrolled in the course. |
[ld_course_info] |
Displays the list of registered course progress details and all quizzes the user has completed. |
|
User Groups | [user_groups] |
Displays the list of groups to which users are assigned, either as users or leaders. |
[ld_video] |
This shortcode enables the positioning of the player elsewhere within the content. It does not require any parameters. |
|
[ld_course_expire_status] |
Displays the expiration date of a course for the current user. |
|
[usermeta] |
Displays information about the user. |
|
[courseinfo] |
Displays information about the course. |
|
Certificate Shortcodes | [quizinfo] |
Displays information about the quiz. |
Using Shortcodes in LearnDash:
1. [ld_quiz_list]
This shortcode displays a list of quizzes. Quizzes provide a way for you to measure a user’s understanding of the learning material in your course. LearnDash quizzes come with many options to customize the experience.
To add the LearnDash shortcode for displaying a list of quizzes on a course page, edit the course page in the WordPress admin area. Add a new block by clicking on the “+” icon, search for “Shortcode,” and select the “Shortcode” block. Enter the LearnDash shortcode for listing quizzes (e.g., [learndash-course-list]) into the Shortcode block.
Preview the course page to see how the shortcode displays the list of quizzes, then update the page to save your changes.
This shortcode has the capability to accept various parameters.
- [ld_quiz_list num=”15″]: Restricts the number of quizzes shown.
- [ld_quiz_list order=”ASC”]: Displays the quiz lists in either ascending or descending order.
- [ld_quiz_list tag_id=”10″]: Exhibits quizzes with the specified tag ID.
- [ld_quiz_list category_name=”C++”]: Presents quizzes with the specified category slug.
2. [ld_profile]
This shortcode presents a user’s enrolled courses, progress in courses, quiz scores, and earned certificates. It can be customized using the following parameters:
This shortcode offers several parameters for customization:
- per_page=”15″: Determines the number of courses displayed per page before pagination is applied.
- course_points_user=”yes”: Hides the display of a user’s earned course points.
- expand_all=”yes”: Expands all sections of the profile.
- orderby=”title”: Specifies how courses should be arranged. Use in conjunction with the order parameter.
- order=”ASC”: Determines the order in which courses are arranged. Use either “ASC” for ascending or “DESC” for descending order, in conjunction with the orderby parameter.
3. [ld_course_list]- How to use LearnDash Shortcodes
This shortcode displays a list of courses and offers a wide range of parameters to customize which courses are shown and how they are presented.
Here are the parameters available for use with the ld_course_list shortcode:
- num: Limits the number of courses displayed.
- order=”ASC”: Sets the order of courses (ascending or descending).
- orderby=”title”: Sets the criteria for ordering the list of courses.
- mycourses=”true”: Displays the current user’s courses.
- col=”4″: Sets the number of columns to display when using the course grid addon.
- cat=”10″: Displays courses with the specified category ID.
- category_name=”java”: Displays courses with the specified category slug.
- category_selector=”true”: Displays a dropdown for selecting a course category.
- tag=”java”: Displays courses with the specified tag.
- tag_id=”30″: Displays courses with the specified tag ID.
- course_cat=”10″: Displays courses with the specified course category ID.
- course_category_name=”java”: Displays courses with the specified course category slug.
- course_category_selector=”true”: Displays a dropdown for selecting a course category.
- course_tag=”java”: Displays courses with the specified course tag.
- course_tag_id=”20″: Displays courses with the specified course tag ID.
4. [learndash_course_progress]
This shortcode displays a user’s progress bar for the course on any course, lesson, or quiz page. If you are using it outside of a course or for a specific user, there are two alternatives you can use:
The shortcode learndash_course_progress user_id=”10″ shows the progress for a specific user, and learndash_course_progress course_id=”7″ displays the progress for a specific course.
Also Read: Introducing Pro Version of BuddyPress Shortcodes | BuddyPress Elementor Shortcode Widgets
5. [ld_user_course_points]
This shortcode displays the user’s earned course points. It can also be used to create a custom student profile page using page builders like Elementor or Beaver Builder.
6. [course_content]- How to use LearnDash Shortcodes
This shortcode shows the Course Content table, including lessons, topics, and quizzes, when inserted on a page or post. For example, [course_content course_id=”7″] displays the course content for the course with Course ID: 7.
7. [ld_lesson_list]
The [ld_topic_list] shortcode is used to display a list of topics. You can place this shortcode on any page or widget. It accepts parameters such as num, order, orderby, tag, tag_id, cat, category_name, topic_tag, topic_tag_id, topic_cat, topic_category_name, and topic_categoryselector.
8. [ld_topic_list]
The [ld_topic_list] shortcode is used to display a list of topics. It can be placed on any page or widget. This shortcode supports parameters such as num, order, orderby, tag, tag_id, cat, category_name, topic_tag, topic_tag_id, topic_cat, topic_category_name, and topic_categoryselector.
Also Read: How to Find LearnDash Course ID
9. [visitor]
This shortcode displays content if the user is not enrolled in the course. It can be used on any page or widget area and accepts the following parameters:
[visitor course_id=”14″]
This content might be seen by individuals who do not have access to the course. You could provide a link to a sign-up form or email capture here.
[/visitor]
10. [course_complete]
Utilize the shortcode to display content if the user has completed the course. This shortcode is versatile and can be used on any page or widget area.
This shortcode can take the following parameters:
The “course_complete” shortcode displays content if the student has access to a specific course.
Example:
[course_complete course_id=”8″] insert any content here [/course_complete]
[course_complete course_id=”3″] This may be seen by individuals who have completely finished the course. You could provide a link to a certificate here, or suggest related courses they should attempt straightaway. [/course_complete]
11. [course_inprogress]
This shortcode displays content if the user has started but not completed the course. It can be utilized on any page or widget area.
This shortcode can take the following parameters:
- course_id: Shows content if the student has access to a specific course. Example: [course_inprogress course_id=”4″]insert any content[/course_inprogress].
- user_id: If not provided, the current logged-in user will be used. Example: [course_inprogress course_id=”4″ user_id=”3″]insert any content[/course_inprogress].
Also Read: Top 8 Points for Creating a Perfect Website Typography
12. [course_notstarted]- How to use LearnDash Shortcodes
This shortcode will display content to individuals who have not yet completed any steps in the course.
[course_notstarted course_id=”10″]
This content is visible to individuals who have not yet completed any steps in the course. You could provide a message encouraging them to start.
[/course_notstarted]
13. [student]
This shortcode displays content if the user is enrolled in the course. It can be utilized on any page or widget area.
This shortcode can take the following parameters:
- course_id: Optional. Displays content if the student has access to a specific course.
- Example: [student course_id=”3″] insert any content [/student].
[student course_id=”3″]
This content is visible to individuals who have access to the course.
[/student]
14. [ld_course_info]
This shortcode displays the courses for the users. It can take the following parameters: user_id, which if not provided, will default to the current user.
Model use: [ld_course_info user_id=”01″] will display the courses for user 50.
Also Read: What is Learndash Subscriptions Feature For Online Courses
15. [user_groups]
The [user_groups] shortcode displays the list of groups to which users are assigned as members or leaders.
16. [ld_group]
This shortcode displays content exclusively to users who are enrolled in a particular group, ensuring that the information is relevant and tailored to their group’s focus. It provides a personalized experience, fostering a sense of community and belonging among group members. This feature can be particularly useful for online courses, where group-specific resources or announcements need to be communicated effectively.
17. [ld_video]- How to use LearnDash Shortcodes
The [ld_video] shortcode is utilized in Lessons and Topics that have Video Progression enabled.
The video player is normally inserted above the content, but with the [ld_video] shortcode, you can position the player anywhere within the content.
This shortcode does not require any parameters.
Also Read: How to Get Page ID and Post ID
18. [ld_course_expire_status]- How to use LearnDash Shortcodes
The shortcode shows the expiration date of a user’s course access.
When used on a course page, [ld_course_expire_status] will automatically detect the course and the user, displaying a message accordingly. 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}
19. LearnDash Certificate Shortcodes
These shortcodes allow you to display personalized information about the user and the specific course or quiz associated with the certificate. You can include details such as the user’s name, the title of the course, the date of completion, the quiz grade, and other relevant information.
There are 3 main shortcodes:
- [usermeta]: Shows user info
- [courseinfo]: shows course info
- [quizinfo]: shows quiz info
Conclusion on How to use LearnDash Shortcodes
LearnDash shortcodes are a powerful tool for customizing your online courses and providing a personalized learning experience for your users. By using shortcodes, you can add a variety of elements to your course content, such as progress bars, quizzes, and user information, to enhance the learning experience and make your courses more engaging. Experiment with different shortcodes to see how they can improve your online courses and help you achieve your teaching goals.
Interesting Reads:
Mastering Customer Retention: How Interactive Content Elevates Engagement
Top 8 Board Games Club WordPress Theme To Use
10 Best Free CDN Services For Your WordPress Website
Its High Time To Change Old Powerpoint : Morden Software For Presentation