LifterLMS Shortcodes: The Complete Reference With Examples

Every shortcode in LifterLMS 10.3 core, grouped by job, with its real attributes, defaults and a working example, plus when to use a block instead and how to build your own shortcode safely.

  • Add as a preferred source on Google
Illustration for “LifterLMS Shortcodes: The Complete Reference With Examples”

LifterLMS shortcodes let you place course grids, progress bars, checkout forms, login forms and conditional content anywhere WordPress accepts a shortcode: a page, a widget, a page builder module or a PHP template. Blocks cover most of the same ground in the block editor, but shortcodes still matter for page builders, classic themes, emails of your own and custom templates.

This reference lists every shortcode registered by the LifterLMS 10.3 core plugin, with the attributes it actually accepts and their defaults, taken from the plugin source. Add-ons register more of their own; those are noted at the end. Developers will find a section on calling shortcodes in code and writing their own.

How LifterLMS shortcodes work

A few rules apply to all of them:

  • Context matters. Many course shortcodes default to "the current post". Placed on a course or one of its lessons, they find the course automatically. Placed on any other page, they need an ID attribute.
  • Most are enrollment-aware. Progress and continue shortcodes print nothing for visitors who are not enrolled. That is useful on shared pages but confusing when you test as an administrator who is not enrolled.
  • IDs are post IDs. Find a course, membership or access plan ID in the URL of its edit screen (post=123). Access plan IDs are shown in the plan's header in the course or membership editor.
  • Yes and no. Boolean attributes use yes/no or 1/0 depending on the shortcode; the tables say which.

Shortcodes or blocks?

In the block editor, prefer the LifterLMS blocks: they have the same output, a settings panel instead of attributes, and visibility controls for enrolled or non-enrolled visitors. Use shortcodes in page builders without a native LifterLMS module, classic widgets, PHP templates, and anywhere you need conditional content inside a text field. Our LifterLMS blocks guide maps each block to its shortcode.

Catalog shortcodes: courses and memberships

[lifterlms_courses]

Outputs a grid of course tiles.

AttributeDefaultNotes
idemptyComma-separated course IDs to show only those courses
categoryemptyA course category slug
minenoany, enrolled, expired or cancelled limits the grid to the current student's courses with that status
hiddenyesno excludes courses whose catalog visibility is Hidden
posts_per_page-1Number of courses; -1 shows all
order / orderbyASC / titleStandard WordPress ordering values
post_statuspublishRarely changed

Example, a "My active courses" page: [lifterlms_courses mine="enrolled" orderby="date" order="DESC"]. If the student has no matching courses, LifterLMS prints a message instead of the whole catalog. Our course catalog guide covers catalog layout in depth.

[lifterlms_memberships]

The membership equivalent, with category (membership category slug), posts_per_page, order and orderby. Example: [lifterlms_memberships category="business" posts_per_page="6"].

A simpler course grid that accepts category, per_page, order and orderby. Prefer [lifterlms_courses] for new pages; it has more options.

Course and lesson shortcodes

All of these accept course_id and default to the current course, or the parent course when used on a lesson.

ShortcodeOutputsExtra attributes
[lifterlms_course_author]Author name and avataravatar_size (48), bio (yes)
[lifterlms_course_instructors]All listed instructorsnone
[lifterlms_course_meta_info]Length, difficulty, categories, tags and tracksnone
[lifterlms_course_syllabus]The full syllabus with lock and completion statusnone
[lifterlms_course_outline]A compact outlineoutline_type (full or current_section), collapse (0), toggles (0)
[lifterlms_course_prerequisites]A notice listing unmet prerequisitesnone
[lifterlms_course_reviews]Reviews and the review formnone
[lifterlms_course_continue]Progress bar plus continue button, enrolled students onlynone
[lifterlms_course_continue_button]Just the button: Get Started, Continue, or a "Course Complete" linenone

Two older shortcodes work on the current course only and take no ID: [lifterlms_course_title] and [lifterlms_course_progress]. Add check_enrollment="1" to the progress shortcode so it prints nothing for visitors who are not enrolled.

Example, a collapsible outline of only the student's current section in a lesson sidebar: [lifterlms_course_outline outline_type="current_section" collapse="1" toggles="1"].

[lifterlms_course_info]

Prints a single stored course value. Attributes: id (current post), key, type (empty, date or price) and date_format. Keys ending in _date are treated as dates automatically. Examples:

  • [lifterlms_course_info key="length"] prints the Course Length field.
  • [lifterlms_course_info key="start_date" date_format="j F Y"] prints the course start date.
  • [lifterlms_course_info id="123" key="enrolled_students"] prints the stored enrolled-student count.

Lesson shortcodes

  • [lifterlms_lesson_mark_complete] prints the Mark Complete button, or Take Quiz and assignment buttons when the lesson has them. Use it when a page builder template replaces the default lesson layout. Without it, students cannot complete the lesson.
  • [lifterlms_lesson_navigation] prints previous and next lesson links.
  • [lifterlms_favorites] lists the student's favourite lessons when Lesson Favorites is enabled under Courses settings. Attributes: orderby (updated_date), order (ASC) and limit.

Selling and account shortcodes

Pricing, buttons and checkout

  • [lifterlms_pricing_table product="123"] shows the access plans of a course or membership. Without product it uses the current post. See our pricing table guide for layout tips.
  • [lifterlms_access_plan_button id="456"] links straight to checkout for one access plan. Attributes: type (primary, secondary, action or danger), size (small or large), classes for your own CSS classes. Text between opening and closing tags replaces the button label: [lifterlms_access_plan_button id="456" size="large"]Join the spring cohort[/lifterlms_access_plan_button].
  • [lifterlms_checkout] renders checkout and must sit on the page set as Checkout under LifterLMS > Settings > Checkout. You do not normally add it by hand.

Account, login and registration

  • [lifterlms_my_account] is the student dashboard, placed on the page chosen as the dashboard page. Attributes: layout (columns or stacked) and login_redirect, the address a student is sent to after logging in from the dashboard page.
  • [lifterlms_login] shows the login form anywhere. Attributes: layout (columns) and redirect (the current page). Example: [lifterlms_login layout="stacked" redirect="/dashboard/"]. Our guide to login pages and redirects explains the redirect order.
  • [lifterlms_registration] shows the registration form you edit under LifterLMS forms. It is hidden from visitors who are already logged in.
  • [lifterlms_my_achievements] shows the current student's achievements. Attributes: count, columns (5) and user_id.

Conditional and personal content

[lifterlms_hide_content]

Shows its content only to users enrolled in the given courses or memberships, and an optional message to everyone else.

[lifterlms_hide_content id="123,456" relation="any" message="Join a course to see the bonus downloads."]
Bonus downloads go here.
[/lifterlms_hide_content]

id takes one or more course or membership IDs and defaults to the current post. relation is all (default: enrolled in every listed item) or any. The older membership attribute still works for one membership. This is page-level personalisation, not file security: a link revealed inside it can still be shared. For protecting files, see our guide to protecting course media files, and for whole pages, restricting pages and posts to members.

[llms-user]

Prints a field from the current user's account, with a fallback. [llms-user first_name or="there"] prints "Hi there" style greetings for logged-out visitors. The key can be any user field or user meta key; passwords are blocked.

A link to a membership: [lifterlms_membership_link id="789"]Upgrade to Pro[/lifterlms_membership_link]. Without enclosed text it uses the membership title. It prints nothing if the membership is not published.

Instructors and forums

[lifterlms_membership_instructors] lists instructors on a membership page. [lifterlms_bbp_course_forums] lists bbPress forums linked to a course when the bbPress integration is enabled; see our bbPress course forums guide.

Using and building shortcodes in code

In a theme template or custom plugin, run a shortcode with do_shortcode():

echo do_shortcode( '[lifterlms_course_continue_button course_id="' . absint( $course_id ) . '"]' );

When you need something core does not offer, write your own shortcode on top of LifterLMS functions rather than editing core. This one prints the current student's progress percentage for any course as plain text, handy inside a sentence:

add_shortcode( 'llmsx_progress_text', 'llmsx_progress_text_shortcode' );
function llmsx_progress_text_shortcode( $atts ) {
	$atts    = shortcode_atts( array( 'course_id' => get_the_ID() ), $atts, 'llmsx_progress_text' );
	$student = llms_get_student();
	if ( ! $student || ! llms_is_user_enrolled( $student->get_id(), $atts['course_id'] ) ) {
		return '';
	}
	return esc_html( round( $student->get_progress( absint( $atts['course_id'] ), 'course' ) ) . '%' );
}

Usage: You are [llmsx_progress_text course_id="123"] of the way through. Core shortcodes also expose filters: every tag registered through the older method can be renamed with {tag}_shortcode_tag, and the list of shortcode classes loaded passes through llms_load_shortcodes, documented on the LifterLMS developer hub.

Add-on shortcodes and troubleshooting

Paid add-ons register their own shortcodes, for example [llms_pa_info] from Private Areas and [llms_sl_directory] from Social Learning. They only work while the add-on is active. LifterLMS keeps a shortcode list in its documentation as well.

  • The shortcode prints as text. It is inside a code block or a builder field that does not process shortcodes. Use a Shortcode block or module.
  • It prints nothing. You are probably not enrolled, or the page is not a course and no ID was given.
  • Wrong course. On a page that lists several courses, pass course_id explicitly.
  • Curly quotes. Pasting from a word processor turns " into typographic quotes, which breaks attributes.

Frequently asked questions

Where do I find an access plan ID?

In the course or membership editor, in the header of each access plan in the pricing section.

Can I show different content to enrolled and non-enrolled visitors?

Yes. Use [lifterlms_hide_content] with a message for non-enrolled visitors, or block visibility settings in the block editor.

Is [courses] still supported?

It still works as an alias of [lifterlms_courses] but is deprecated. Replace it.

What to do next

Bookmark this page, and replace any hard-coded links to courses or checkout on your site with the matching shortcode or block so they stay correct when plans change.

If you need a shortcode that does not exist, such as a team progress table or a custom catalog filter, our LifterLMS plugin development service builds them as update-safe plugins. Describe what you want on the page and we will tell you whether a core shortcode already does it.

Add LifterLMS Expert to your preferred sources

Add lifterlmsexpert.com as a preferred source on Google, or open this article in your AI assistant to use it as a source.

  • Add as a preferred source on Google
Free consultation

Prefer expert help over DIY?

Skip the trial and error. Get specialist LifterLMS help and ship faster.

Talk to a LifterLMS Expert Explore our services

Replies within one business day