The Member Directory can be customized by changing attributes of the Shortcode or adjusting the settings of the Member Directory Block.
Using the [pmpro_member_directory]
Shortcode
Navigate to the WordPress page for your directory and click through to edit the page in the WordPress admin.
If you generated the Member Directory page, it will automatically include the following shortcode: [pmpro_member_directory]
. Shortcode attributes include:
elements
Attribute
The elements attribute controls what information is shown in the directory and the order the information is displayed.
This attribute accepts a list of label names (optional) and values in the format label,name;
(e.g., elements="avatar|256;display_name;Company,company;Website,user_url"
.)
Supported values for the elements attribute include:
- User Information: The user object data (stored in the WordPress Users table), including:
user_login
,user_email
,user_url
,user_registered
, ordisplay_name
. - User Meta Information: The user meta data (stored in the WordPress Usermeta table). Use the
name
value of any custom User Field you’ve created or any otherusermeta
field available in your site. - Membership Information: Details about the active membership, including:
membership_name
,membership_startdate
, andmembership_enddate
. - Address Information: If you are using the Mailing Address Add On, you can display the member’s address using the field ID
pmpro_mailing_address
. If you want to add individual fields from the mailing address, you can use:pmpro_sfirstname
pmpro_slastname
pmpro_saddress1
pmpro_scity
pmpro_sstate
pmpro_scountry
pmpro_szipcode
pmpro_sphone
- Avatar: Show the member’s avatar and customize the size shown, e.g.,
elements="Profile Picture,avatar|256"
.
layout
Attribute
Choose the layout of your Directory. The layout attribute accepts the following values:
div
: Display each member in its own full width block.table
: Display members in a table. Each element will be shown in its own column of the table.2col
: Display members in two columns.3col
: Display members in three columns.4col
: Display members in four columns.
levels
Attribute
The level ID or a comma-separated list of level IDs to include in the directory. By default, all membership levels will be included in the directory. (e.g., levels="1,2"
).
If your directory displays the member level names, and the member holds multiple levels, all of their active membership names will appear in a comma-separated list. This list is limited by the value of the levels attribute.
limit
Attribute
The number of members to display per page.
link
Attribute
By default, every listing in your Directory will be linked to the Profile page for that member. You can remove this link and have a single Directory with no individual profiles by setting the link attribute to false (e.g., link="false"
).
show_map
Attribute
A boolean value of whether or not to show the map. defaults: true
if you have defined a Google Maps API Key within Advanced Settings.
If the map is displayed, the following additional shortcode attributes are available to style the map:
map_zoom
: The default starting zoom value. default:8
(accepts any value from1
to20
).map_height
: The map’s height in pixels. default:400
(accepts any integer).map_width
: The map’s percentage width of the page. default:100
(accepts any value from1
to100
).map_max_zoom
: The maximum zoom level allows for the map. default:NULL
for no limit or restriction (accepts any value from1
to20
).map_infowindow_width
: The width of the marker infowindow in pixels. default:300
(accepts any integer).
order
and order_by
Attributes
The order_by attribute adjusts the sort order for the results. The directory is automatically sorted by the member’s display name. The order_by
attribute accepts the following values: u.user_email
, u.display_name
, u.user_login
, u.user_registered
, mu.membership_id
, mu.startdate
, joindate
.
The order attribute sorts the results based on the order_by
attribute in ascending or descending order. default: ASC
(accepts DESC
or ASC
).
show_search
Attribute
Optionally hide the search form from the Directory. (e.g., show_search="false"
).
Using the Member Directory Block
Select the Member Directory Block to see block options, including:
Display Options
- Select Levels: A multiselect field of which levels to include in the directory.
- Layout: Choose the display of the directory. You can also display your directory as a Table, or in a Column-style layout.
- Show Search: Displays a search form that searches on member display name or email address if checked.
- Show Avatar: Displays the user’s avatar generated via Gravatar or user-submitted using a plugin like Basic User Avatars if checked.
- Avatar Size: The square pixel dimensions of the avatar to display. default: ‘128’ (accepts any numerical value).
- Show Level: Displays the user’s membership level if checked.
- Show Email Address: Displays the user’s email address if checked.
- Show Start Date: Displays the user’s membership start date for their current level if checked.
- Show Link: Optionally link the user’s directory entry to their profile page, if the profile page is defined.
Map Options
Check the box next to “Show Map” to display a map of members in your directory. The map will only display if you have defined a Google Maps API Key within Advanced Settings.
- Map Zoom: The default starting zoom value. default:
8
(accepts any value from1
to20
). - Map Height: The map’s height in pixels. default:
400
(accepts any integer). - Map Width: The map’s percentage width of the page. default:
100
(accepts any value from1
to100
). - Max Zoom: The maximum zoom level allows for the map. default:
NULL
for no limit or restriction (accepts any value from1
to20
). - Infowindow Width: The width of the marker infowindow in pixels. default:
300
(accepts any integer).
Extra Fields
Use this textarea to display additional user meta fields. The field accepts a list of label names and field IDs, one per line. For example:
Company,company Website,user_url
Filtering Options
- Order By: Choose a sort order for the results. The default directory will sort members by Display Name.
- Order: Sort the results in ascending or descending order.
- Limit: The number of members to display per page. This field accepts any integer.
Members can opt out of the Member Directory by checking the “Hide from Member Directory?” field on the “Edit Profile” page.
Get Support From Our Team of Experts
For more help with this PMPro feature, check out our Support Page with three ways to get support as a free or premium member.
Last updated on August 20, 2025