Sensei LMS Theming
A comprehensive guide to theming in Sensei LMS.
If your Sensei LMS content isn’t displaying how it should, please check out Sensei & Theme Compatibility.
Sensei LMS’s templating system is simple for developers to understand and customize in their theme. You will find Sensei LMS’s template folder in the plugin’s root directory, under /templates/ – this folder contains all the HTML that Sensei LMS will output on the front end.
You can override any of the templates found in this folder by copying them to /yourthemefolder/sensei/ and editing the files there. Sensei LMS will automatically load any template files you have in that folder and use them instead of its default template files.
If you’re using a template which resides in a subdirectory of the /templates/ directory, you must preserve that subdirectory in /yourthemefolder/. This is the safest way to make changes to Sensei LMS’s templates, as your changes will not be overwritten when it is updated.
Note: Since Sensei v4.16.0, there is a new email template editor that doesn’t allow overriding email templates via PHP files.
Customization is handled directly in the editor now, so you must update there. Read more about editing email templates.
Before you continue to look at the file structure, please take a look at our template hooks. This will allow you to make the most of your customizations without ever touching the template files.
The following files handle the course archive page:
The archive will output all courses with filters at the top, which can further filter the courses listed.
The URL for this page will be the same as the page set within Admin > Sensei > Settings > General > Course Archive Page.
The following files handle the lesson archive page:
These files will display a simple archive list of all lessons that have been created.
The individual course page is handled by single-course.php
These files will output the individual course and its contents.
The following files handle the individual lesson page:
These files will output the individual lesson and a link to the lesson quiz.
The individual quiz page is handled by single-quiz.php.
The single quiz page uses the following files to output questions types:
- /single-quiz/question-type-boolean.php (True/False questions)
- /single-quiz/question-type-file-upload.php (File Upload questions)
- /single-quiz/question-type-gap-fill.php (Gap Fill questions)
- /single-quiz/question-type-multi-line.php (Multi Line questions)
- /single-quiz/question-type-multiple-choice.php (Multiple Choice questions)
- /single-quiz/question-type-single-line.php (Single Line questions)
These files will output the lessons quiz questions and handle the submission of the users’ question answers.
The learner profile pages are handled by learner-profile.php
These files handle the display of the learner profiles.
The course results these template files handle page:
These files handle the display of the course results.
The course category makes use of the course archive templates. See above.
The My Courses page will show a list of the users’ Active Courses and their Completed Courses. The template file that is used is
If a user cannot access a specific area of the Course, Lesson, or Quiz, the output will be handled by no-permissions.php to display the relevant error message.