Apps Ballance Chat Click Code Cog_Wheels Compose_email Conference Contacts Earth Edit_File_1_ Email Email_2 File Folder_2 Gift Group Group_2 Help ID ID_2 Key Keys Laptop_Store Link Lock Log_Out Map Marketing Mobile_UI Navigation Partnership Profile Safe_2 Search_User Secure_Files Settings Share Shield Shield_2 Shopping_Cart Support_Male Trash Type_pin User_female User_male logo copy

Customizing the user directory template

Iain Poulson avatar
Iain Poulson Last updated on March 6, 2021

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

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.

Need more help?

If you still didn't find an answer you can always contact us

Submit a ticket