The [pmpro_member_directory_search] shortcode is used to display a search form for the Member Directory Add On. This allows users to search for members within the directory.
Add Search Field
To add a search form to any page or post, simply include the shortcode in the content editor:
[pmpro_member_directory_search]
The search form sends visitors to the Directory page assigned in Memberships > Settings > Pages, where the matching members are shown.
Restrict the directory search with the Content Visibility block or shortcode.
Video: Coding with Sam Walkthrough
What the Search Matches
The directory search looks for the search term in these member values:
- Names: The member’s display name, first name, and last name. These are always searched, even when they aren’t shown in the directory.
- Fields Shown in the Directory: Any user field, user meta field, or User Field that your directory displays, such as
user_login,user_email,user_url, or a custom field. Fields that aren’t shown aren’t searched. For example, the search only matches email addresses when your directory displays the member’s email address. - Mailing Address: If your directory shows the
pmpro_mailing_addresselement, the search also looks in the member’s mailing address fields.
User Fields that are limited to certain membership levels only match members who have one of those levels. This is the same rule the directory uses to decide whether to display the field.
Search terms are matched as plain text. Characters like % and _ are not treated as wildcards.

Developers can change which user meta the search looks in with the pmpro_member_directory_search_meta_keys filter.
Troubleshooting Search Results
Some servers may not allow the large queries needed to execute a directory and profiles search. You will know this is the case if you are using the search form and no results are returned when you know results should be returned.
The recipe below can be used to allow your hosting environment to process the large JOIN operations needed for this Add On.
Get Support From Our Team of Experts
Have a question about how to use this feature? Our Support Page outlines three ways to get support.
Our Max plans include hands-on help customizing your membership site and implementing new features. Upgrade to PMPro Max now »
Last updated on November 12, 2026

