Member Directory Add On Enhancements: New Formatting, Added Fields, NEW User Profiles

pmpro_member_directory-avatarsEnhance your membership site with a public or private, searchable directory and NEW member profiles. The add on includes two shortcodes, which can be customized with easy-to-define attributes.

Member Profiles have special handling for file-type fields (audio, video, image, document, YouTube, Vimeo). The shortcode will embed or display based on mime type.

View the Add On


Directory and Profile Shortcode Attributes

pmpro_member-directoryShortcode attributes for [pmpro_member_directory] include:
  • 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. fields=”Company,company;Website,user_url”).
  • 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’).

pmpro_member-profileShortcode attributes for [pmpro_member_profile] include:
  • 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. fields=”Company,company;Website,user_url”).
  • levels: The level ID or a comma-separated list of level IDs that allow profiles. default: all levels (accepts a single level ID or a comma-separated list of IDs).
  • 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_bio: Display the user’s bio (if available); default: true (accepts ‘true’ or ‘false’).
  • show_billing: Display the user’s billing address (if available); default: true (accepts ‘true’ or ‘false’).
  • show_email: Display the user’s email address; default: true (accepts ‘true’ or ‘false’).
  • show_name: Display the user’s display name; default: true (accepts ‘true’ or ‘false’). Use our Force First Last plugin to batch update display names.
  • show_level: Display the user’s membership level; default: true (accepts ‘true’ or ‘false’).
  • show_phone: Display the user’s billing phone (if available); 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’).
  • user_id: Show a specific member’s profile; default: none (accepts any numeric uesr id, i.e. user_id=”125″).

Members can opt out of the member directory by checking the “Hide from Directory?” field on the “Edit Profile” page.


Notes about File-type Fields

If you are displaying a field that is a file type (audio, video, image, document), the shortcode will attempt to embed or display the file based on the mime type (about WordPress filetypes).


Notes about other Third-Party embeddable links (YouTube, Vimeo, etc.)

The field will also display as an embed (list of supported sites here) if the field value can be embedded via oEmbed (about WordPress oEmbeds).


Installation

  1. Members with a valid PMPro Plus license can install and activate this add on via the Memberships > Add Ons admin page. Or, download the zip file (above) and upload the ‘pmpro-member-directory’ directory to the ‘/wp-content/plugins/’ directory of your site.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Create a page for your directory and set the appropriate shortcode attributes and “Require Membership” settings per your needs.
  4. Create a page for your profile and set the appropriate shortcode attributes and “Require Membership” settings per your needs.
  5. Navigate to Memberships > Page Settings to assign your pages to the Directory and Profile page settings.
View the Add On

Shortcode Examples

Show only level IDs 1 and 4, hide avatars and email address:

[pmpro_member_directory levels="1,4" show_avatar="false" show_email="false"]

Show all level IDs, hide level name and start date:

[pmpro_member_directory show_level="false" show_startdate="false"]

Show a unique member directory by level. Level 1 Members can only see other Level 1 Members…:

[membership level="1"]
[pmpro_member_directory levels="1"]
[/membership]
 
[membership level="2"]
[pmpro_member_directory levels="2"]
[/membership]
 
[membership level="3"]
[pmpro_member_directory levels="3"]
[/membership]

Show unique member profiles based on level – hide user phone number and email address.

[membership level="1"]
[pmpro_member_profile show_email="false" show_phone="false"]
[/membership]
 
[membership level="2"]
[pmpro_member_profile show_email="true" show_phone="true"]
[/membership]

Screenshots

Member Directory – 4 Column Layout
pmpro_member_directory-avatars


Member Directory – Table Layout
pmpro_member-directory-table


Member Profile
pmpro_member-profile


Member Profile with File Embeds
pmpro_member_profile-files