A lot of times when building a site or theme with WP User Manager, you will want to customize the template of the user directory. Luckily WPUM allows you to do this and it’s very easy to do.
First of all, you should learn how the template system works. Read more information in this article:
https://wpusermanager.com/article/121-templates-customization/
Now that you learned how to override the templates, we will have a look at which templates are used by the user directory.
Main Directory Template
templates/
directory.php
The directory.php file, is the template file responsible to handle the display of a directory. You should only modify the code between this line
<!-- start directory -->
and this line
<!-- end directory -->
Please do not remove calls to the do_action() function within this file. The plugin itself and the addons will make use of these actions, removing those lines will break the plugin and it’s addons.
Single User Template
/directory/
single-user.php
The main directory template file loads an additional file called “single-user”. This file is used to display the detail of each individual user found within the directory.
Top Bar Template
directory/
top-bar.php
Each directory has the ability to display a “sort” field and an “amount modifier” field. It also displays the total amount of users that have been found for that directory.
Get Started with the Best WordPress Membership Plugin Today
Connect, Manage and Build your Membership Site