Course Shortcodes
Course Shortcodes
These shortcodes read from the current course. Place them on a course page, or on a lesson page — the lesson's parent course is resolved automatically. Outside those two contexts they output nothing.
None of the course shortcodes take attributes. Each one outputs a single value, so they work anywhere WordPress processes shortcodes: a Paragraph or Shortcode block, a classic-editor field, a theme widget, or a text control in a page builder that does not support Elementor dynamic tags.
Keys ending in ID and URL use upper case. [le-courses-featured-plan-URL] works; [le-courses-featured-plan-url] does not.
When to use a course shortcode
Inside Elementor the equivalent dynamic tags are the better tool — they bind to controls directly. Reach for a shortcode when the content is being written somewhere Elementor is not:
Block-editor course pages — a course description written in the block editor can show its own price, length, or categories with a Shortcode or Paragraph block, without switching the page to Elementor.
Theme and sidebar widgets — a Custom HTML or Text widget in a theme sidebar that appears on course and lesson pages can display the current course's title or progress.
Other page builders — a text control in a builder that has no LifterLMS integration still processes WordPress shortcodes.
Custom snippets — the ID and URL keys give a developer the values needed to wire up a custom button or do_shortcode() call.
Course Title
Returns the course title.
Key: le-courses-title · Output: plain text
[le-courses-title]
Use it when — a lesson page's block-editor content needs to name its parent course ("Part of [le-courses-title]"), or a sidebar heading should change with the course being viewed.
Course Content
Returns the course description as written in the block editor, with any LifterLMS blocks (syllabus, pricing table, and so on) removed so only your own content is returned.
Key: le-courses-content · Output: HTML
[le-courses-content]
Use it when — a lesson page should repeat the course overview, for example in a "What this course covers" panel that stays identical on every lesson. Do not place it inside the course's own content — it would render itself.
Course Categories
Returns the course's categories as a comma-separated list of links to each category archive.
Key: le-courses-categories · Output: HTML (linked list)
[le-courses-categories]
Course Tracks
Returns the course's tracks as a comma-separated list of links to each track archive. Empty if the course is not assigned to a track.
Key: le-courses-tracks · Output: HTML (linked list)
[le-courses-tracks]
Course Difficulty
Returns the difficulty level set under Course Options in the course editor. Empty if none is set.
Key: le-courses-difficulty · Output: plain text
[le-courses-difficulty]
Course Estimated Time
Returns the Course Length value from Course Options — the free-text estimate the course author entered, such as "4 weeks". Empty if none is set.
Key: le-courses-estimated-time · Output: plain text
[le-courses-estimated-time]
Use it when — building a meta line for a course card or header outside Elementor. The four meta shortcodes combine naturally: [le-courses-difficulty] · [le-courses-estimated-time] · [le-courses-categories]. Each is empty when the field is unset, so surround them with punctuation that reads acceptably when one is missing, or test with the Course Meta widget first to see which fields your courses actually fill.
Course Featured Image URL
Returns the URL of the course's featured image. Empty if the course has no featured image.
Key: le-courses-featured-image-url · Output: URL
[le-courses-featured-image-url]
Course Audio URL
Returns the Audio Embed URL from Course Options. Empty if none is set.
Key: le-courses-audio-url · Output: URL
[le-courses-audio-url]
Course Video URL
Returns the Video Embed URL from Course Options. Empty if none is set.
Key: le-courses-video-url · Output: URL
[le-courses-video-url]
Use the three media URL shortcodes when — you want to feed the course's image, audio, or video into a player or block of your choosing instead of LifterLMS's built-in output: an <img src="[le-courses-featured-image-url]"> in a Custom HTML block, an Embed block, or a third-party player that takes a raw URL. The value is the URL only, with no markup around it.
Course Progress Percent
Returns the logged-in student's progress through the course as a percentage with the % sign, for example 45%. Returns 0% for students who have not started and for logged-out visitors.
Key: le-courses-progress-percent · Output: plain text
[le-courses-progress-percent]
Course Progress Percent Number
The same progress value as a bare whole number with no % sign, for example 45. Use this when the value feeds a calculation or a width, rather than being displayed as text.
Key: le-courses-progress-percent-number · Output: number
[le-courses-progress-percent-number]
Use the progress pair when — writing progress into copy ("You're [le-courses-progress-percent] of the way through") uses the % version; driving a width, a comparison in a snippet, or a custom progress bar uses the bare number:
<div class="my-bar"><span style="width:[le-courses-progress-percent-number]%"></span></div>
For a ready-made bar inside Elementor, use the Course Progress widget instead.
Featured plan shortcodes
LifterLMS lets a course have several access plans, each with a Visibility setting. The six featured-plan shortcodes read from the first plan marked Featured, in the order the plans appear in the course editor. If no plan is featured, all six return nothing.
Use the plan shortcodes when — you want a pricing line or enroll link in content you write yourself, rather than LifterLMS's pricing table or the Access Plan Button widget. A typical block-editor line:
<p><strong>[le-courses-featured-plan-name]</strong> — [le-courses-featured-plan-price] [le-courses-featured-plan-frequency]
<a class="button" href="[le-courses-featured-plan-URL]">[le-courses-featured-plan-enroll-text]</a></p>
Choose featured-plan-* when you curate one headline plan per course by marking it Featured; choose plan-* (below) when courses have a single plan or you always want whichever plan is listed first. Frequency is empty for one-time plans, so the line above reads cleanly for both.
Course Featured Plan Name
Returns the plan's name.
Key: le-courses-featured-plan-name · Output: plain text
[le-courses-featured-plan-name]
Course Featured Plan Price
Returns the plan's price with currency symbol. If the plan is on sale, the sale price is returned instead. A free plan returns the word FREE.
Key: le-courses-featured-plan-price · Output: HTML
The regular price is wrapped in LifterLMS's price markup (<span class="lifterlms-price">…</span>), so it picks up your theme's price styling; a sale price is returned as plain text such as $80.
[le-courses-featured-plan-price]
Course Featured Plan Frequency
Returns the plan's billing frequency as LifterLMS displays it — for example per month for 12 total payments for a subscription. Empty for a one-time payment plan.
Key: le-courses-featured-plan-frequency · Output: plain text
[le-courses-featured-plan-frequency]
Course Featured Plan Enroll Text
Returns the plan's Enroll Text — the label LifterLMS puts on the plan's enroll button. Returns Enroll when the plan has no custom text.
Key: le-courses-featured-plan-enroll-text · Output: plain text
[le-courses-featured-plan-enroll-text]
Course Featured Plan URL
Returns the plan's checkout URL, so you can build your own enroll link or button.
Key: le-courses-featured-plan-URL · Output: URL
<a href="[le-courses-featured-plan-URL]">[le-courses-featured-plan-enroll-text]</a>
Course Featured Plan ID
Returns the plan's post ID. Mainly useful when passing the plan to another shortcode or a custom snippet.
Key: le-courses-featured-plan-ID · Output: number
[le-courses-featured-plan-ID]
First plan shortcodes
The six plan shortcodes work exactly like their featured-plan counterparts, but read from the first access plan in the course editor's order regardless of its Visibility setting. Use these when a course has a single plan, or when the plan you want to show is not the featured one.
Course Plan Name
Key: le-courses-plan-name · Output: plain text
[le-courses-plan-name]
Course Plan Price
Returns the price with currency symbol; the sale price if the plan is on sale; FREE for a free plan. Same markup as the featured-plan version.
Key: le-courses-plan-price · Output: HTML
[le-courses-plan-price]
Course Plan Frequency
Empty for a one-time payment plan.
Key: le-courses-plan-frequency · Output: plain text
[le-courses-plan-frequency]
Course Plan Enroll Text
Key: le-courses-plan-enroll-text · Output: plain text
[le-courses-plan-enroll-text]
Course Plan URL
Returns the plan's checkout URL.
Key: le-courses-plan-URL · Output: URL
[le-courses-plan-URL]
Course Plan ID
Key: le-courses-plan-ID · Output: number
[le-courses-plan-ID]
Notes
- Every course shortcode has an equivalent dynamic tag for use inside Elementor. Prefer the dynamic tag when you are editing in Elementor; use the shortcode everywhere else.
- The full list of registered shortcodes is also shown in your WordPress admin under Settings > Lifter Elements > Documentation.