How to Override Templates

A- A+

The WP User Frontend supports template overriding from a theme. That means you can change the appearance of the plugin specific designs. The overrideable files are located in the templates folder. Here is a hierarchy for you:

├── templates/
│   ├── dashboard.php
│   ├── logged-in.php
│   ├── login-form.php
│   ├── lost-pass-form.php
│   ├── reset-pass-form.php

So all the files mentioned above can be overridden in your theme.

Steps to override a template for the WP User Frontend

  1. Make a folder named “wpuf” in your theme.
  2. Copy the template you want to override from the templates folder of the plugin.
  3. Paste the template file in the wpuf folder inside your theme.
  4. Now open the file in a text editor and edit something.
  5. Now reload the page from the browser and check if that works

Say, for example, that I want to override the edit-profile.php file through my child theme

Here's something noteworthy: it’s highly recommended to override the file through the child theme instead of the main theme. Otherwise, the file customisation will get reverted to the original once any theme update happens.

So to override the edit-profile.php file, I have to copy the file from

/wp-content/plugins/wp-user-frontend/templates/dashboard/edit-profile.php to /wp-content/themes/twentytwenty-child/wpuf/dashboard/edit-profile.php.

Then modify the file content as you want.

Same as to override the login-form.php file:

Copy the file from the directory,

/wp-content/plugins/wp-user-frontend/templates/login-form.php) and paste it into your child theme directory (/wp-content/themes/twentytwenty-child/wpuf/login-form.php.

Then modify the file content as you want.