Overriding Templates

In Membership by Supsystic plugin you can override any of the templates to your own taste. For templates we use template engine for PHP – Twig.

To override a template you need:

  1. In the root directory of your theme create a directory supsystic-membership.
  2. Create a folder with the name of needed module.
  3. In this folder create file of the template that you want to override to the template in the folder views of the template.

Folder structure in the view directory should be the same. For example, you need to override template of user’s profile

{plugin_directory}/membership-by-supsystic/src/Membership/Users/views/profile.twig

To do this you need to create such file in your template directory.

{template_directory}/supsystic-membership/users/profile.twig

And for the file –

{plugin_directory}/membership-by-supsystic/src/Membership/Users/views/partials/users-list.twig

The path will be like this:

{template_directory}/supsystic-membership/users/partials/users-list.twig

Categories
Latest Articles