[reigntutorcourse]
An enhanced course listing shortcode. It forwards standard parameters to Tutor LMS’s [tutor_course] and adds Reign display controls, enrolled-course listing, and progress bars.
Registered as reign_tutor_course.
Standard parameters
Section titled “Standard parameters”These are passed through to Tutor LMS unchanged.
| Attribute | Default | Description |
|---|---|---|
id |
empty | Specific course IDs, comma-separated. |
exclude_ids |
empty | Course IDs to exclude, comma-separated. |
category |
empty | Category ID or slug, comma-separated. |
orderby |
post_date |
Sort field passed to Tutor LMS. |
order |
DESC |
ASC or DESC. |
count |
12 |
Number of courses to show. |
column_per_row |
context-based | Columns. Defaults to 3, or 2 in a profile or author context. |
show_pagination |
on |
Show pagination: on or off. |
course_filter |
off |
Show the Tutor LMS filter bar: on or off. |
Reign parameters
Section titled “Reign parameters”| Attribute | Default | Description |
|---|---|---|
my_courses |
no |
yes switches to the resolved user’s enrolled courses. |
user_id |
empty | A specific user ID, or current for the logged-in user. Used with my_courses="yes". |
show_progress |
no |
yes shows a progress bar on each card. Only applies with my_courses="yes". |
course_status |
all |
Filter enrolled courses: all, completed, in-progress, or not-started. Underscore variants are accepted. |
layout_style |
default |
Adds a layout-<value> class. list and grid have dedicated CSS. |
show_instructor |
yes |
no hides the instructor area. |
show_category |
yes |
no hides the course category. |
show_duration |
yes |
no hides the duration meta. |
show_students |
yes |
no hides the students count. |
show_lessons |
yes |
no hides the lesson count. |
columns |
empty | Alias for column_per_row. When set, it overrides column_per_row. |
Behavior notes
Section titled “Behavior notes”- With
my_courses="yes"the addon resolves the user (see Enrolled courses), fetches enrolled course IDs, and renders them through Tutor LMS. A logged-out visitor with no resolvable user sees a “Please log in to view your courses.” message. - When showing enrolled courses, the output starts with a translatable count line and paginates automatically past 12 courses.
- When
course_filter="on", the addon injects hidden filter fields Tutor LMS expects to avoid a JavaScript parse error. - The wrapper element is
.reign-tutor-courseswithlayout-*andhide-*modifier classes.
Examples
Section titled “Examples”Regular listing:
[reign_tutor_course count="6" category="web-development" course_filter="on"]Enrolled courses with progress:
[reign_tutor_course my_courses="yes" show_progress="yes" count="4"]Completed courses for a specific user:
[reign_tutor_course my_courses="yes" user_id="123" course_status="completed"]Card layout in four columns:
[reign_tutor_course count="8" layout_style="card" column_per_row="4"]
