Template Overrides
Reign LearnDash Addon overviewPremiumGet Reign LearnDash Addon →
The add-on never copies LearnDash’s templates. Those stay LearnDash’s, and you override them in learndash/ld30/ as LearnDash documents. The add-on’s own parts live in templates/ and are overridden from a separate folder.
How to override
Section titled “How to override”Copy the part from the add-on’s templates/ folder to the same path under learndash/reign/ in your child theme. Keep the path the same.
reign-learndash-addon/templates/card/course.phpyour-child-theme/learndash/reign/card/course.phpLookup order: child theme, parent theme, then the add-on. The reign_ld_locate_template filter can change the result.
Template parts
Section titled “Template parts”| Part | Path | Variables |
|---|---|---|
| Courses page | archive/courses.php |
None. Prints the archive frame and the grid. |
| Instructor banner | archive/instructor.php |
$instructor (WP_User) |
| Grid | archive/grid.php |
$atts, $chosen, $items, $total, $view, $options, $pages, $reset |
| Filter bar | archive/filters.php |
$atts, $chosen, $options, $reset |
| Course card | card/course.php |
$id, $title, $url, $image, $category, $instructor, $avatar, $excerpt, $lessons, $rating, $price, $progress, $status, $button, $fields |
| Group card | card/group.php |
$id, $title, $url, $image, $excerpt, $courses, $leader, $avatar, $price, $progress, $status, $button, $fields |
| Related courses | course/related.php |
$courses (array of course IDs) |
| Profile Courses sub-tab | community/profile-courses.php |
$section, $filters, $status, $cards, $own |
Each file has a docblock that lists its variables. Templates print values that PHP has already prepared. Escape everything you print.
Hooks around every part
Section titled “Hooks around every part”Parts drawn by the add-on’s loader fire an action before and after, and a filter on their data. The hook name is the part path with / and - replaced by _.
| Part | Before | After | Data filter |
|---|---|---|---|
archive/instructor |
reign_ld_before_archive_instructor |
reign_ld_after_archive_instructor |
reign_ld_archive_instructor_data |
archive/grid |
reign_ld_before_archive_grid |
reign_ld_after_archive_grid |
reign_ld_archive_grid_data |
archive/filters |
reign_ld_before_archive_filters |
reign_ld_after_archive_filters |
reign_ld_archive_filters_data |
card/course |
reign_ld_before_card_course |
reign_ld_after_card_course |
reign_ld_card_course_data |
card/group |
reign_ld_before_card_group |
reign_ld_after_card_group |
reign_ld_card_group_data |
course/related |
reign_ld_before_course_related |
reign_ld_after_course_related |
reign_ld_course_related_data |
community/profile-courses |
reign_ld_before_community_profile_courses |
reign_ld_after_community_profile_courses |
reign_ld_community_profile_courses_data |
archive/courses is the page template WordPress loads, so it has no before and after hooks. Use the theme’s reign_before_content_section and reign_after_content_section actions.
The actions receive the data array. Use them to add something without an override.
Version header and the outdated check
Section titled “Version header and the outdated check”Every add-on part has @version 5.2.0 in its docblock. Keep that line in your copy, and set it to the version you copied.
The add-on compares your copy with the add-on part. If your copy is older, or has no @version, it is listed under Update status > Outdated template overrides on Reign Settings > Integrations, then Configure on the LearnDash tile. The list shows the file path, your version and the current version. Compare your copy with the new part, then update the @version line.
Removed
Section titled “Removed”The add-on no longer replaces LearnDash’s templates, and nothing outside learndash/reign/ loads as an add-on part. Copies you made for 5.1.0 do not load.

