Enhanced Member Directory

This shortcode will display a directory of your members on the frontend like EMD example here. The member list supports pagination, and unlimited custom filtering/sorting options giving you a flexible way to showcase and present your members and choose which custom fields appear for each member.

How to Embed This Shortcode in Editor

[userpro template=emd]

How to Embed This Shortcode with PHP

<?php echo do_shortcode('[userpro template=emd]'); ?>

Shortcode Options

Example

Options are used to customize the shortcode and can be assigned as a pair option=value in your shortcode like this.

[userpro template=emd option=value]

EMD Options and Parameters

  • emd_filters – Show/hide search and filters on the sidebar of members. 0 to disable filters, and 1 to enable. Default: 1
  • emd_thumb – Avatar size as number only. e.g. 200 will display profile photos 200px wide.
  • emd_social – Show/hide social icons bar in EMD shortcode. Default: 1 to show
  • emd_bio – Show/hide user bio in member directory. Default: 1 to show
  • emd_fields – A comma seperated list of custom fields to show for each user in list, e.g. emd_fields=first_name,last_name,gender,country will display name, gender and country. This option uses custom field keys.
  • emd_col_width – The width of each column in percentage, by default: emd_col_width=22%
  • emd_col_margin – The margin for each column in percentage. Example: 2% will leave 2% margin beside each item.
  • emd_per_page – Number of users to show per page, by default: 20 members are shown per page.
  • emd_paginate – Enable/disable pagination in EMD shortcode, default: 1 to enable pagination
  • emd_paginate_top – Enable/disable pagination display on top of member results. Default: 1 to show pagination on top as well as bottom.

How to Make Custom Search Filters in EMD?

Example 1: Make Gender as Custom Filter

Use this in your shortcode: emd_gender="Gender,radio"

The first part is the label that appears and presents your new filter, the 2nd part “radio” will make the filter choices as radio buttons.

Example 2: Make Country as Custom Filter

Use this in your shortcode: emd_country="Country,dropdown"

This example makes Country as custom filter and output the filter as “dropdown” choices.

Example 3: Make City Custom Field as Filter

Use this in your shortcode: emd_city="City"

If you do not set radio or dropdown for filter, it will be a default search input/text. You can make unlimited custom search filters using this method, including custom fields you created by using this pattern. emd_{custom_field}=”Label,type” in your emd shortcode.

Was this article helpful?

Related Articles

Leave A Comment?