Customize the Sensei Templates

You must first complete Purchase & Activate Sensei before viewing this Lesson

This lesson will show you the basics of Sensei’s templating system, how it is structured, and how to integrate it with your themes.

Plugin structure

As with the WooCommerce plugin, the template files are located in the /templates/ folder in the root of the plugin. Inside this folder you will find the files that you will need in order to customize your theme.

Theme integration

Integrating and making changes to Sensei in your theme is very easy. Out of the box Sensei will work with your theme, however should you wish to make changes to the markup or the structure of a Course, Lesson, etc, all you need to do is make a folder called /sensei/ in your theme root. Then simply copy the files and folder over from the plugins /templates/ folder. Then you can make your changes and the plugin will load the files from the theme first.

Hooks

Sensei has some standard hooks that are available for use:

sensei_before_main_content() – this runs before the loop

sensei_after_main_content() – this runs after the loop

sensei_pagination() – this runs after main content

sensei_comments() – this only runs on the lesson single page

sensei_sidebar() – this runs on every single/archive sensei page

Back to: Sensei Theming 101

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Thanks for submitting your comment!
Lesson Details
Length
10 minutes
Complexity
Hard