Most LearnDash users build their first course page, hit publish, and then stare at a layout that looks nothing like the demo.
The courses are there. The students are registered. But the dashboard is empty, the course catalog is a wall of unstyled text, and nobody can find the login button.
Nine times out of ten, the answer is shortcodes.
LearnDash shortcodes are small WordPress commands wrapped in square brackets that output dynamic LMS content anywhere on your site. Course catalogs. Student profiles. Progress bars. Certificate links. Login forms. Payment buttons. All without writing a single line of PHP.
This guide covers every core LearnDash shortcode with real copy-ready examples, essential parameters, and the mistakes that silently break things.
Key Takeaways
- LearnDash shortcodes and blocks share identical features. Blocks work in Gutenberg; shortcodes work everywhere else, including page builders, widgets, and PHP templates.
- Curly quotes silently break shortcode parameters with no error message. Always retype quotes manually after pasting from any formatted editor.
- Most shortcodes output nothing for the wrong user type. A logged-out visitor, a non-enrolled user, and an enrolled student see completely different things.
- Conditional shortcodes require both an opening and a closing tag. A missing [/student] or [/course_complete] breaks the entire block without warning.
- course_id is required for most shortcodes when placed outside a native course page. Leaving it out produces silent, empty output.
- The Elementor Shortcode widget breaks Course Grid column layouts. Switching to a Text or HTML widget fixes it every time.
- SnapOrbital builds purpose-built LearnDash plugins that extend what shortcodes can do, from visual course customization to learner engagement tools, all designed to work alongside LearnDash without replacing it.
What Are LearnDash Shortcodes?
A LearnDash shortcode is a WordPress shortcode command that outputs dynamic LMS content inside pages, posts, widgets, and templates.
Static content stays the same for every visitor. A shortcode like [ld_course_list] reads the database and returns a live, filtered list of courses. [ld_profile] pulls the logged-in user’s name, enrolled courses, quiz scores, and certificates in real time. No custom queries. No PHP loops.
WordPress has supported shortcodes since version 2.5. LearnDash extends this foundation with dozens of LMS-specific commands that help admins, developers, agencies, nonprofits, and course creators customize LearnDash pages without custom development.
LearnDash Shortcodes vs LearnDash Blocks
This is usually the first question that comes up: blocks or shortcodes?
LearnDash provides a Gutenberg block for every shortcode. Official documentation confirms that every shortcode has a corresponding block with identical features and options. Blocks are easier for visual editing inside Gutenberg. Shortcodes are what you need everywhere blocks do not reach.
| Use Case | Best Option |
| Gutenberg block editor | LearnDash blocks |
| Classic Editor | Shortcodes |
| Elementor, Divi, Kadence, Beaver Builder | Shortcodes |
| Widgets and sidebars | Shortcodes |
| PHP theme templates | do_shortcode() |
| Reusable documentation and snippets | Shortcodes |
WordPress powers around 41.5% of all websites, and Elementor alone is active on over 31% of WordPress sites. That is a significant share of the web where Gutenberg blocks simply do not function. LearnDash shortcodes do.
What About do_shortcode?
For developers building custom theme templates, do_shortcode(‘[ld_course_list]’) processes a shortcode inside PHP files. Use it in custom template files only. Never edit plugin files directly, as changes there break on every update.
How to Use LearnDash Shortcodes in WordPress
Adding a LearnDash shortcode to a WordPress page takes four steps:
- Open the page in the block editor
- Add a Shortcode block by searching “shortcode” in the block inserter
- Paste the shortcode using straight quotes, not curly quotes
- Preview the page while logged in as the correct user type before publishing
Step four is the one most people skip. [ld_profile] shows nothing to logged-out visitors. [ld_course_list mycourses=”true”] shows nothing if the test account has no enrollments. Always test with a real student account, not your admin.
For configuration details, the full plugin documentation covers each shortcode step by step.
Shortcode Syntax Rules That Prevent Most Problems
- ✅ Straight quotes only: course_id=”12″ not the curly-quote version
- ✅ Correct format: name=”value” with no extra spaces inside brackets
- ✅ Closing tags on conditionals: [student]…[/student]
- ✅ Retype quotes manually after pasting from Google Docs, PDFs, or Word
Using Shortcodes in Page Builders
In Elementor, Divi, Beaver Builder, and Kadence, use a Text or HTML widget instead of the built-in Shortcode widget. The Elementor Shortcode widget has a confirmed bug where the Course Grid layout collapses to one column regardless of the col value set in the shortcode. Text and HTML widgets render the output correctly.
Complete LearnDash Shortcodes Reference Table
| Shortcode | What It Displays | Key Parameters | Notes |
| [ld_course_list] | Course list or grid | num, col, mycourses, progress_bar, orderby, category_name | Course Grid add-on required for full grid layout |
| [ld_lesson_list] | Lessons from a course | course_id | Include course_id outside course pages |
| [ld_topic_list] | Topics from a lesson | lesson_id | Requires lesson context |
| [ld_quiz_list] | Quizzes for a course or lesson | course_id, lesson_id | Useful for quiz dashboards |
| [ld_group_list] | All LearnDash groups | None required | Shows all available groups |
| [course_content] | Full course outline | course_id | Required outside a native course page |
| [ld_materials] | Materials for a post, course, or lesson | post_id | For downloadable resources |
| [ld_video] | Video progression player | None | Video progression must be enabled on the post |
| [ld_profile] | Full user profile | None required | Auto-detects logged-in user |
| [ld_course_info] | Registered courses and quiz activity | None required | Lighter alternative to [ld_profile] |
| [ld_user_course_points] | User course points total | user_id | Good for gamification and dashboards |
| [user_groups] | Groups a user belongs to | None | Auto-detects current user |
| [ld_course_resume] | Resume course button | None | Returns user to last lesson or topic visited |
| [learndash_course_progress] | Course progress bar | course_id, user_id | Enrolled users only |
| [ld_course_expire_status] | Course access expiration date | format, label_before, course_id | Only shows when expiration is configured |
| [ld_certificate] | Certificate download link | None required | Only displays when a certificate has been earned |
| [learndash_login] | Login or logout link | login_label, logout_label | Login and Registration must be enabled in settings |
| [ld_registration] | Registration form | width | Avoid fixed width for mobile responsiveness |
| [ld_reset_password] | Front-end password reset form | width | Place on a dedicated reset password page |
| [learndash_payment_buttons] | Enrollment or purchase button | course_id | Works with PayPal, Stripe, and 2Checkout |
| [ld_infobar] | Course info and enrollment status | course_id, group_id | Added in LearnDash 4.0 |
| [student]…[/student] | Content for enrolled users only | user_id, course_id | Closing tag required |
| [visitor]…[/visitor] | Content for non-enrolled users | None | “Visitor” means not enrolled, not just logged out |
| [course_notstarted]…[/course_notstarted] | Content before course is started | course_id | Closing tag required |
| [course_inprogress]…[/course_inprogress] | Content during active progress | course_id | Closing tag required |
| [course_complete]…[/course_complete] | Content after course completion | course_id | Closing tag required |
| [ld_quiz_complete]…[/ld_quiz_complete] | Content after quiz is completed | quiz_id | Closing tag required |
| [ld_group]…[/ld_group] | Content for group members only | group_id | Closing tag required |
| [usermeta] | Student name or email | field | Certificate templates only |
| [courseinfo] | Course title or completion date | show | Certificate templates only |
| [quizinfo] | Quiz score or completion date | show | Certificate templates only |
LearnDash Course List Shortcodes
[ld_course_list]: The Core Catalog Shortcode
The ld_course_list shortcode is the most-used shortcode in LearnDash. It outputs a list or grid of courses with filtering, sorting, pagination, and column controls built in.
Show all courses:
[ld_course_list]
Show enrolled courses with progress bars in a 3-column grid:
[ld_course_list mycourses=”true” progress_bar=”true” col=”3″]
Show 8 marketing courses sorted by title:
[ld_course_list num=”8″ orderby=”title” category_name=”marketing”]
One thing to know about progress_bar=”true”: it only renders for courses where the user is already enrolled or has completed the course. Visitors and non-enrolled users see nothing. Always test logged in as a student.
Common mistakes with [ld_course_list]:
- Leaving num empty on a large site, which loads every course on one page
- Using the Elementor Shortcode widget instead of an HTML widget for column layouts
- Expecting progress bars to appear for users who are not yet enrolled
To extend what the default course list can do visually, you can download LearnDash plugins built specifically for catalog and layout enhancement.
[ld_lesson_list], [ld_topic_list], and [ld_quiz_list]
These three shortcodes surface the inner structure of a course outside its default page.
[ld_lesson_list course_id=”123″]
[ld_topic_list lesson_id=”456″]
[ld_quiz_list course_id=”123″]
The learndash lesson list shortcode is particularly useful for building custom course overview and landing pages. Always include the parent ID. Without it, the output is empty and there is no error message to tell you why.
[course_content]: Display the Full Course Outline
[course_content course_id=”12″]
[course_content] replicates the full lesson, topic, and quiz outline for a course. Outside a native course page, course_id is required.
⚠️ Watch out: adding this shortcode to a page where LearnDash already renders the outline by default produces duplicate output. This is a common conflict in BuddyBoss and Elementor setups.
LearnDash Profile and Student Dashboard Shortcodes
LearnDash does not automatically create a student dashboard. These shortcodes let you build one that actually works.
[ld_profile]: The Learner Dashboard Centerpiece
The ld_profile shortcode displays the logged-in user’s avatar, name, email, enrolled courses, progress, quiz scores, certificates, and course points all at once. It auto-detects the current user.
[ld_profile]
One limitation: there is no parameter to hide individual fields like course points or certificates. If your site does not use those features, the extra fields still appear. Custom CSS is the practical fix.
Some teams extend the dashboard with complementary learner tools. You can add learner notes to LearnDash lessons (the LearnDash Notes documentation covers the full setup) or let students save favorite LearnDash content to create a richer experience alongside the default profile output. Tools like these, available through Snap Orbital LearnDash plugins, complement the profile shortcode without replacing it.
[ld_course_info]: A Cleaner “My Courses” Alternative
Where [ld_profile] shows everything, [ld_course_info] focuses on registered courses and quiz activity. It is a better choice for a standalone “My Courses” page without the full profile header.
[ld_course_info]
Complete the Dashboard With These Three Shortcodes
[ld_user_course_points]
[user_groups]
[ld_course_resume]
[ld_user_course_points] shows the learner’s course points total, useful for gamification setups and leaderboards. [user_groups] lists all group memberships, which matters for cohort-based programs and corporate training. [ld_course_resume] generates a “Resume Course” button that drops the student directly back into their last lesson or topic.
LearnDash Course Progress Shortcodes
[learndash_course_progress]: Show a Progress Bar Anywhere
The learndash_course_progress shortcode displays a visual progress bar for a specific course.
[learndash_course_progress course_id=”12″ user_id=”34″]
On a native course page, no parameters are needed. Outside a course page, always pass course_id. If the output is empty, verify that the user is enrolled. Non-enrolled users and visitors see nothing, which is correct behavior.
[ld_course_expire_status]: Display Access Expiration Dates
[ld_course_expire_status format=”F j, Y” label_before=”Expires on:” course_id=”12″]
This shortcode only outputs something when course expiration is active and configured. On courses without expiration settings, it renders nothing. That is not a bug.
LearnDash Certificate Shortcodes
Here is one of the most common points of confusion in LearnDash: there are two completely different types of certificate shortcodes, and they do not work in the same places.
[ld_certificate]: The Front-End Certificate Download Link
The ld_certificate shortcode places a download link for an earned certificate on any front-end page.
[ld_certificate]
The link only appears after a certificate has been earned. A best practice is wrapping it in
[course_complete] to prevent an empty placeholder from showing to students who have not finished:
[course_complete course_id=”15″]
Congratulations! Your certificate is ready: [ld_certificate]
[/course_complete]
Certificate Template Shortcodes: [usermeta], [courseinfo], [quizinfo]
These three shortcodes work exclusively inside the LearnDash certificate builder. They are not for use on regular WordPress pages.
- [usermeta] outputs the student’s name or email on the certificate PDF
- [courseinfo] outputs the course title, completion date, or cumulative score
- [quizinfo] outputs the quiz title, score, or completion date
Place them on a regular page and they output nothing. This trips up a lot of site builders who expect them to behave like other shortcodes. They do not. Certificate template shortcodes are for certificate templates only.
LearnDash Login, Registration, Payment, and Enrollment Shortcodes
These shortcodes handle the full enrollment journey from first-time visitor to paying, enrolled student.
[learndash_login]: Add a Login Area to Any Page
[learndash_login]
[learndash_login login_label=”Member Login” logout_label=”Log Out”]
The learndash_login shortcode displays a Login link that triggers LearnDash’s popup modal. For logged-in users, it automatically switches to a Logout link.
Required setup: The Login and Registration feature must be enabled under LearnDash LMS > Settings and the LearnDash 3.0 template must be active. If the link appears but the modal does not open, check for JavaScript conflicts from other plugins or themes.
[ld_registration] and [ld_reset_password]
[ld_registration]
[ld_reset_password]
Place [ld_registration] on a dedicated Registration page and [ld_reset_password] on a dedicated Reset Password page. After creating these pages with the shortcodes, assign them under LearnDash LMS > Settings > Registration/Login. Without that assignment step, LearnDash falls back to legacy behavior.
Avoid the width parameter on [ld_registration]. Fixed widths break mobile responsiveness and are not recommended. Also confirm that “Anyone can register” is checked under WordPress Settings > General, or the registration form shows nothing.
[learndash_payment_buttons] and [ld_infobar]
[learndash_payment_buttons course_id=”12″]
[ld_infobar course_id=”12″]
[learndash_payment_buttons] places the “Take This Course” or purchase button anywhere on the page. It is ideal for custom sales pages and landing pages. [ld_infobar] shows the full course header with enrollment status and price, useful on custom course pages where the default header is missing.
LearnDash Conditional Shortcodes
Conditional shortcodes show or hide content based on who is viewing the page and where they are in the learner journey. They are the most powerful shortcodes in LearnDash and the most error-prone.
Every conditional shortcode requires a closing tag. Forgetting it is the single most common mistake.
[student] and [visitor]: Control Visibility by Enrollment Status
[student]Download your course workbook here.[/student]
[visitor]Enroll now to access the full course.[/visitor]
[student] shows content only to users enrolled in the current course. [visitor] shows content only to users who are not enrolled.
Here is the distinction that trips up most site builders: a logged-in user who has not enrolled is still a “visitor” in LearnDash’s logic. Visitor does not mean anonymous. It means not enrolled in this course.
Course Progress Conditional Shortcodes
These three shortcodes serve different messages based on where the learner is in the course:
[course_notstarted course_id=”12″]
Welcome! Let’s start with Lesson 1.
[/course_notstarted]
[course_inprogress course_id=”12″]
Pick up where you left off. You’re making great progress.
[/course_inprogress]
[course_complete course_id=”12″]
You did it! Your certificate is ready below.
[/course_complete]
Place all three on a course or lesson page for a fully dynamic experience that adapts to each student’s status automatically. No extra plugins needed.
[ld_quiz_complete] and [ld_group]
[ld_quiz_complete quiz_id=”45″]You passed! Here is your bonus resource.[/ld_quiz_complete]
[ld_group group_id=”22″]This message is for your cohort only.[/ld_group]
[ld_quiz_complete] is ideal for unlocking bonus content after a quiz. [ld_group] restricts content to members of a specific LearnDash group, which is perfect for cohort programs, corporate training, and classroom setups.
Common LearnDash Shortcode Problems and Fixes
When something breaks with no error message, always isolate the issue by testing with a real student account. Admin accounts bypass enrollment checks and do not trigger conditional shortcodes the same way students do.
For complex issues, contact Snap Orbital support or review the plugin changelogs and compatibility updates to confirm shortcode behavior against the latest LearnDash release.
Best Practices for Using LearnDash Shortcodes
1. Use official shortcodes before writing custom code. LearnDash covers almost every standard LMS use case out of the box. Before writing a custom WP_Query loop to list courses, try [ld_course_list] with filters. It is faster, cleaner, and stays update-safe.
2. Always retype quotes manually. Copy-pasting shortcode examples from Google Docs, PDFs, or formatted web pages introduces curly quotes that break parsing with no error message. It looks right. It breaks silently.
3. Include required IDs outside native context. Most shortcodes need course_id when placed outside a course page. Topic lists need lesson_id. Quiz completion conditionals need quiz_id. Missing any of these produces empty output and no warning.
4. Test with multiple user roles. Before publishing, test as: logged-out visitor, logged-in but not enrolled user, enrolled student, course completer, and group member. Admin accounts see everything and will not reveal conditional shortcode issues.
5. Filter your course catalogs. An unfiltered [ld_course_list] on a site with 50 or more courses creates an overwhelming page. Use num, category_name, tag, and col to keep catalogs organized, scannable, and fast.
6. Build reusable dashboard page templates. Combine [ld_profile], [ld_course_list mycourses=”true” progress_bar=”true”], [ld_course_resume], and [user_groups] into a single reusable template. Agencies and training organizations can deploy it across multiple sites without rebuilding from scratch. If you want to go further with visual layout control, LearnDash Visual Customizer features and the Visual Customizer documentation show what design customization looks like beyond the shortcode layer.
7. Know when to extend beyond shortcodes. When shortcodes alone cannot deliver the learner experience you need, purpose-built plugins fill the gap. You can add private coaching sessions to LearnDash, add specialized learner tools, or find further options in the Snap Orbital documentation.
LearnDash Shortcode Parameters at a Glance
LearnDash Shortcodes FAQ
What are LearnDash shortcodes? LearnDash shortcodes are WordPress shortcode commands that display dynamic LMS content including course lists, student profiles, progress bars, certificates, login forms, payment buttons, and conditional content anywhere on a WordPress site without custom PHP.
How do I use LearnDash shortcodes in WordPress? Add a Shortcode block in the WordPress block editor, paste the shortcode using straight quotes, and preview the page while logged in as the appropriate user type before publishing.
What is the shortcode for a LearnDash course list? Use [ld_course_list] for all courses. Add mycourses=”true” to show only enrolled courses. Add num, col, category_name, and orderby for filtered, organized catalogs.
What is the LearnDash profile shortcode? [ld_profile] displays the current user’s full learner profile including enrolled courses, progress, quiz scores, certificates, and course points.
How do I display course progress in LearnDash? Use [learndash_course_progress course_id=”12″] on any page. The course_id parameter is required when used outside a native course page.
How do I show a LearnDash certificate link? Use [ld_certificate] on a profile or completion page. Wrap it inside [course_complete course_id=”X”]…[/course_complete] to ensure the link only appears after the course is finished.
Do LearnDash shortcodes work with Elementor? Yes. Use a Text or HTML widget instead of Elementor’s built-in Shortcode widget to avoid column layout issues with the Course Grid add-on.
Should I use LearnDash blocks or shortcodes? Use blocks inside the Gutenberg editor for visual editing. Use shortcodes in the Classic Editor, page builders, widgets, and PHP theme templates.
Why is my LearnDash shortcode not working? The most common causes are curly quotes in the shortcode, a missing course_id, a shortcode placed inside a Code block instead of a Shortcode block, or testing while logged in as the wrong user type.
Can I use LearnDash shortcodes in page builders? Yes. In Elementor, Divi, Beaver Builder, and Kadence, place shortcodes inside a Text or HTML widget. Watch for Course Grid column layout conflicts in Elementor specifically.
How do I show content only to enrolled students in LearnDash? Use [student]Your content here.[/student]
The closing tag is required. Test with a real enrolled student account, not an admin, to confirm the output.
What is the LearnDash login shortcode? [learndash_login] displays a Login or Logout link that triggers LearnDash’s popup modal. It requires the Login and Registration feature to be enabled under LearnDash LMS > Settings.
Final Takeaway: LearnDash Shortcodes Are a Practical Customization Layer
LearnDash shortcodes are not a workaround. They are a purpose-built system for displaying dynamic LMS content across a WordPress site without custom development.
Use blocks in Gutenberg. Use shortcodes in page builders, theme templates, widgets, and everywhere blocks cannot reach. Use official shortcodes with correct syntax and always test with real user roles before going live.
When you are ready to go further, manage your plugin account as your LearnDash stack grows, or ask Snap Orbital a pre-sales question before committing to a solution.
The goal is always the same: build a learner experience that actually works for the people using it.
Sources
- WordPress Developer. Shortcode API
- W3Techs. WordPress Usage Statistics
- W3Techs. Elementor Usage Statistics



