Course Prerequisites
Course Prerequisites
Renders the prerequisite notice for the current course: a message naming the course and/or course track that LifterLMS requires the student to complete first, with a link to it. The widget reads the prerequisites set under Course Options > Prerequisites in the LifterLMS course editor and shows a notice only while a prerequisite is still outstanding for the current visitor.
Usage
Course template header — Place the widget near the top of a course template built with Templates > Theme Builder, above the Course Content or Course Syllabus widgets, so a student who lands on a locked course sees straight away which course or track to finish first; see How to Build a Course Template.
Plain sentence instead of a notice box — Set Output type: to Text only when the LifterLMS error-notice styling clashes with your design. The same message is output as plain paragraphs that inherit your theme's typography, and you can rewrite the wording with Use a custom text.
Learning paths with tracks — If your courses are grouped into course tracks and a course requires a whole track, the widget names the track and links to its archive. With Text only you can give the track message its own wording through Custom text for tracks.
Gate the rest of the page — The widget only reports the prerequisite; it does not block content. To hide enrollment buttons or lessons until the prerequisite is done, combine it with the Completion status condition.
How it works
The widget checks the current course's course prerequisite and course-track prerequisite separately and prints one message per prerequisite that the visitor has not yet completed. It reads the course from the page being viewed, so use it on course templates.
| Situation | Behaviour |
|---|---|
| The course has no prerequisites | Nothing is rendered. |
| The visitor has completed every prerequisite | Nothing is rendered. |
| The visitor is logged out | Completion cannot be checked, so every prerequisite counts as outstanding and its message is shown. |
| A prerequisite course is outstanding | Before starting this course you must complete the required prerequisite course: followed by a link to the course. |
| A prerequisite track is outstanding | Before starting this course you must complete the required prerequisite track: followed by a link to the track archive. Both messages appear when both a course and a track are outstanding. |
| Output type: is Full template (default) | The output comes from LifterLMS's own [lifterlms_course_prerequisites] shortcode and course/prerequisites.php template, so each message is wrapped in a LifterLMS error notice (llms-notice llms-error) styled by the LifterLMS stylesheet. Theme overrides of that template apply here. |
| Output type: is Text only | The widget builds the message itself as a plain <p> with the link, with no notice wrapper or icon. In this mode the widget renders nothing when the page is not a course. |
Settings
Content
| Setting | Description |
|---|---|
| Output type: | Full template (default) outputs LifterLMS's prerequisite notice through its shortcode and template. Text only outputs the same message as plain paragraph text that you can rephrase. |
| Use a custom text | Yes replaces the LifterLMS wording with the text you enter in the two fields below. Default No. Shown only when Output type: is Text only. |
| Custom text for courses | The sentence printed before the link to a prerequisite course. Defaults to Before starting this course you must complete the required prerequisite course:. The link is appended after your text automatically. Shown only when Use a custom text is Yes. |
| Custom text for tracks | The sentence printed before the link to a prerequisite track. Defaults to Before starting this course you must complete the required prerequisite track:. The link is appended after your text automatically. Shown only when Use a custom text is Yes. |
If a custom text field is left empty while Use a custom text is Yes, the widget falls back to the LifterLMS wording for that prerequisite type.
Style
This widget has no Style tab. In Full template mode the notice is styled by LifterLMS; target .llms-notice.llms-error inside the widget with custom CSS to restyle it. In Text only mode the paragraphs take the surrounding typography, and the Advanced tab's background, border and spacing controls apply to the widget wrapper.
Advanced
The Advanced tab holds Elementor's own layout, motion, responsive and custom-CSS controls — see Elementor's documentation. Lifter Elements adds one section, Conditional Logic, which shows or hides this widget by the visitor's LifterLMS status — see the Conditional Logic reference.
Notes
- In the Elementor editor the widget only shows output when the preview context is a course with an unmet prerequisite for the logged-in editor; otherwise the canvas stays empty.
- Custom text is escaped before output, so HTML entered in the custom text fields is printed literally rather than rendered.
- The default messages are LifterLMS strings, so translations you have for LifterLMS apply to them; custom text is printed as entered.
- Related: Course Content, Course Syllabus, Course Continue Button, Course Tracks dynamic tag.