How It Works
This plugin creates 2 shortcodes for Member Directory and Member Profile pages, which when added to the body of their respective pages will create a new way to view your community’s members.
The Member Directory page lists all of your members with some profile information, an avatar and a link to their Member Profile page(read-only), Member Profile page highlights each member individually but also links to Member Directory page.
You can create the pages manually and add the shortcodes, or you can let the plugin do it for you! To generate your new pages, select Memberships > Page Settings in the WordPress admin area. Shortcode attributes make it easy to update the display of your directory and member profiles, include members by level ID, and display custom user profile information.
A directory can be inserted in any page or post via a Block or Shortcode (
[pmpro_member_directory]). The following settings and attributes are available:
- avatar_size: The square pixel dimensions of the avatar to display. Requires the “show_avatar” attribute to be set to ‘true’. default: ‘128’ (accepts any numerical value).
- fields: Display additional user meta fields. default: none (accepts a list of label names and field IDs, i.e.
- layout: The format of the directory. default: div (accepts ‘table’, ‘div’, ‘2col’, ‘3col’, and ‘4col’).
- levels: The level ID or a comma-separated list of level IDs to include in the directory. default: all levels (accepts a single level ID or a comma-separated list of IDs).
- limit: the number of members to display per page
- link: Optionally link the member directory item to the single member profile page. default: true (accepts ‘true’ or ‘false’).
- order: Sort the results based on the order_by attribute in ascending or descending order. default: ASC (accepts ‘DESC’ or ‘ASC’).
- order_by: The sort order for the results. default: ‘u.display_name’ (accepts ‘u.user_email’, ‘u.user_email’, ‘u.display_name’, ‘u.user_login’, ‘u.user_registered’, ‘mu.membership_id’, ‘mu.startdate’, ‘joindate’)
- show_avatar: Display the user’s avatar generated via Gravatar or user-submitted using a plugin like Simple Local Avatars; default: true (accepts ‘true’ or ‘false’).
- show_email: Display the user’s email address; default: true (accepts ‘true’ or ‘false’).
- show_level: Display the user’s membership level; default: true (accepts ‘true’ or ‘false’).
- show_search: Display a search form (searches on member display name or email address); default: true (accepts ‘true’ or ‘false’).
- show_startdate: Display the user’s membership start date for their current level; default: true (accepts ‘true’ or ‘false’).