[reignlifterlmscourses]
Displays a grid of LifterLMS courses, styled with the Reign course-loop layout. Use it on any page or post to build a custom course catalog.
[reign_lifterlms_courses]Attributes
Section titled “Attributes”All attributes are optional. The values below are the defaults used when the attribute is omitted.
| Attribute | Default | Description |
|---|---|---|
posts_per_page |
12 |
Number of courses per page. The grid paginates by default, so a large catalog does not load every course at once. Set posts_per_page="-1" to show all courses on one page. The default (12) is also filterable with reign_lifterlms_courses_default_per_page. |
per_row |
3 |
Number of course columns per row. |
id |
(none) | Comma-separated list of specific course IDs to show, for example id="12,34,56". When set, only those courses are queried. |
category |
(none) | A course_cat category slug. Only courses in that category are shown. |
post_status |
publish |
Post status of the courses queried. |
enable_slider |
false |
When true, wraps the loop in a slider container instead of a paginated grid. Pagination is applied only when the slider is off. |
Behaviour notes
Section titled “Behaviour notes”- Pagination follows the
pagedquery variable, so the grid works with WordPress pagination on the page it is placed on. This is active only whenenable_slideris off. - Current course is excluded. When the shortcode is rendered on a single course page, the course being viewed is removed from the results.
- Query filter. The full query arguments array is passed through the
rlla_llms_course_shortcode_argsfilter before the query runs, so a developer can adjust ordering, meta queries, and so on.
Examples
Section titled “Examples”Show 8 courses, 4 per row:
[reign_lifterlms_courses posts_per_page="8" per_row="4"]Show all courses in the “design” category:
[reign_lifterlms_courses category="design" posts_per_page="-1"]Show three specific courses:
[reign_lifterlms_courses id="101,205,309"]
