How to create a member directory on WordPress
WordPress does not include a front-end member directory, so a custom build needs code for user queries, profile fields, search, pagination and privacy. For most membership sites, Paid Memberships Pro is the faster route because it supplies directory pages, profiles, filters and visibility controls.
- 01Decide what the directory contains
- 02Build the manual route
- 03Prepare member profile data
- 04Create and protect the directory page
- 05Test search and privacy
- 06Use the faster plugin route
What you need
- A WordPress site with administrator access
- A clear list of member fields to display
- A decision about whether guests or logged-in members can view profiles
- A backup or staging site before changing profile or access settings
Decide what the directory contains
Decide whether each entry represents a WordPress user or a separate organisation. Use WordPress users when members already log in, need to edit their profiles or have membership levels. Use a custom post type instead when entries are businesses, clubs or listings that do not need user accounts.
Choose the fields before building anything. A sensible starting set is display name, photo, short bio, organisation, location, website and a contact method that does not expose a private email address.
Build the manual route
WordPress core can store users and retrieve matching accounts, but it does not provide a finished front-end directory. A developer must create a page or custom plugin that queries users, reads profile values and outputs each card or row. WordPress provides get_users() for retrieving users and user metadata for additional profile fields.
The custom build also needs pagination, search, filtering, escaped output, a profile URL, a rule for inactive accounts and an access check. Add an explicit opt-out field before publishing member data. This route is reasonable for a small, highly customised directory, but it becomes costly when you add front-end editing, membership-level rules, privacy controls or large searches.
Prepare member profile data
Ask members to complete only the information you intend to display. WordPress user profiles already include details such as a display name, website and biographical information, while extra fields are normally stored as user metadata.
Do not publish email addresses, phone numbers or precise home addresses by default. Use a contact form or a business address where appropriate, and tell members whether their profiles will be visible to search engines.
Create and protect the directory page
Create a page called “Members” and add the directory output supplied by your custom code or directory system. Decide whether visitors, logged-in users or selected membership levels can view it. Apply the same restriction to individual profile pages, not just the main directory page.
Check the page while logged out, as a normal member and as an administrator. A common failure is that administrators can see the listings while guests or members see an empty directory because role, privacy or membership rules exclude them. Also test an opted-out member and an account with missing profile fields.
Test search and privacy
Search by name and every custom field you intend to index. Test partial words, accented names, empty searches and a result set larger than one page. On a large directory, broad searches across many user-meta fields can become slow or fail at the database level; narrow the searchable fields or ask your host to review the query limits.
Check that hidden profiles are absent from search results and direct profile URLs, and confirm that cached pages do not show restricted member data. Never treat hiding a link as access control.
Use the faster plugin route
For a working membership site, install Paid Memberships Pro and its Member Directory and Profile Pages Add On. In the WordPress admin, use Memberships > Add Ons, then create or generate the directory and profile pages under the membership page settings. The add-on provides directory and profile blocks or shortcodes, configurable layouts, membership-level filtering and a separate search shortcode.
Configure the displayed fields, limit the directory to active membership levels, and enable the member privacy options. Members can opt out of the directory, while administrators can hide an individual profile. If you add a search form, use [pmpro_member_directory_search]; if search returns no results on a large site, the documentation warns that server limits on large database joins may need attention.
This is the fast way when you need searchable profiles, grid or list-style layouts and membership-based visibility without maintaining the query, template and privacy code yourself.
Let Paid Memberships Pro do it
Adds searchable member profiles with filters, privacy controls, and grid or list layouts for membership sites.
Sources
- developer.wordpress.org /reference/functions/get_users/?utm_source=openai
- wordpress.org /documentation/article/users-your-profile-screen/?utm_source…
- paidmembershipspro.com /documentation/add-on-docs/pmpro-member-directory/?utm_sourc…
- paidmembershipspro.com /documentation/add-on-docs/pmpro-member-directory/control-vi…
- paidmembershipspro.com /documentation/add-on-docs/pmpro-member-directory/directory-…
Questions
- Can WordPress create a member directory without a plugin?
- WordPress can store the member accounts, but it cannot create a finished front-end member directory by itself. You need custom code to query users, display profile data, add search and pagination, control visibility and protect individual profile pages. That is practical for a small directory with developer support, but a plugin is usually quicker for a live membership site.
- Should members be WordPress users or custom posts?
- Use WordPress users when members log in, edit their own details or belong to membership levels. Use a custom post type when the directory lists organisations, businesses or public entries that do not need accounts. Mixing the two models without a clear plan often causes duplicate records and makes privacy and editing permissions harder to manage.
- How do I keep private members out of the directory?
- Add an explicit visibility or opt-out setting and apply it to both directory queries and profile pages. Do not rely on removing a profile link, because a direct URL may still expose the record. Test the site while logged out, as a normal member and as an administrator, and check page caching so restricted data is not served to the wrong visitor.
- Why can an administrator see members but other visitors cannot?
- The usual causes are membership restrictions, role rules, profile privacy defaults or an opt-out setting that excludes users from the query. Check who the directory page is intended for, whether the listed accounts have the required active status and whether the profile page has separate access rules. Also test the directory in a private browser window rather than relying on an administrator session.
- Can I search custom member fields?
- Yes, but the method depends on how the directory is built. A custom directory must include the relevant user-meta fields in its query, while a directory add-on may index them automatically. Paid Memberships Pro’s directory search searches display details and user-meta fields, although broad searches can require substantial database joins on larger sites.