Template Override

From PeepSo Docs
Jump to: navigation, search

This document will show you how to create overrides for PeepSo templates. This method works on all PeepSo plugins.

  1. Every PeepSo plugins have templates directory, determine which plugin you want to change and find the file inside templates directory.
  2. Create overrides/templates directory on your PeepSo directory.
  3. Create another directory inside overrides/templates/[YOUR_NEW_DIRECTORY] with the directory that contains the file you want to change.
  4. Copy the file to that directory and modify it.

For better explanation, let's try to create an overrides for login template.

1. Find the template file that responsible for this view

Template override 1.png

2. The template file that responsible for that view is register-panel.php

Template override 2.png

3. Create overrides/templates directory on your PeepSo directory

Template override 3.png

4. Create general directory inside overrides/templates. It named to general because register-panel.php file is inside general directory.

Template override 4.png

5. Copy register-panel.php to overrides/templates/general directory and modify it.

Template override 5.png

6. In this demo, we change it to look like this

Template override 6.png

Note:
When you update PeepSo plugins, please re-check your template files. Might be there’s something changed in latest version, so you need to re-adjust it to make it uptodate.
We suggest doing it only with decent programming expertise and testing in a staging environment.