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

  Women's Millionaire ®    - All Copyright Reserved - 2023

CONTACT US

Thanks for your message. We'll be in touch with you soon within 24 hours.

Sending

Log in with your credentials

Forgot your details?