WordPress Member Directory Plugin (CMED) - Shortcodes - Available Shortcodes


Expert Directory Index

Back to User Guides

TIP: What Are Shortcodes

Shortcodes add dynamic content to your site via a small piece of code.

Learn more: Shortcodes - How To Use | Finding ID of Post/Page/Other Content

This guide covers the shortcodes that are used in the WordPress Member Directory plugin.

Expert Directory Shortcode

Show a directory structure of all related experts which are related to the shortcode params.

  • Shortcode: [cmed_expert]
  • Attributes:
    • view - the id of the view from the following: image-tiles, list-view, directory-view or new-view (defaults to: image-tiles)
    • filter_search - whether to hide Search filter on Experts Index Page (set 0 to hide)
    • filter_category - whether to hide Categories filter on Experts Index Page (set 0 to hide)
    • filter_expertise - whether to hide Expertise filter on Experts Index Page (set 0 to hide)
    • filter_service - whether to hide Services filter on Experts Index Page (set 0 to hide)
    • filter_language - whether to hide Languages filter on Experts Index Page (set 0 to hide)
    • filter_tag - whether to hide Tags filter on Experts Index Page (set 0 to hide)
    • row_expert - number of the expert in the row (image tiles view only)
    • page_expert - number of the expert on one page
    • cats - the slug of the category from which the expert should be displayed
    • expertise - the slug of additional category from which the expert should be displayed
    • service - the slug of additional category from which the expert should be displayed
    • language - the slug of additional category from which the expert should be displayed
    • tags - the name of the tag the expert displayed should have
    • only_relevant - use 1 if you like only to display the categories associated with experts in the directory. Value should be 1 or 0
    • expert_ids - the IDs of the expert you only want to show in directory. Value should be an ID, or comma separated IDs.
    • exclude_ids - the IDs of the expert you want to exclude from displaying in directory. Value should be an ID, or comma separated IDs.
    • geo_directory - Used inside the GeoDirection plugin settings (set 0 to hide). Learn more: Integration With GeoDirection Plugin
    • show_pagination - Set to 0 if you want to disable pagination for expert list (will be shown 100 experts maximum). Default value is 1. Note: this attribute was introduced in version 1.8.3. See the example of how you can use this attribute in this guide: WordPress Member Directory Plugin (CMED) - Advanced - Pagination
    • level - Set here the slug of a level to display experts related to the chosen level only. Note: this attribute was introduced in version 2.1.5 and works only when the Member Directory Level Add-on is activated. Learn more about how this add-on works in this user guide: Expert Directory - Levels

Examples

  • Directory with only two experts (ID 100 and 101) - [cmed_expert expert_ids="100,101"]
  • Directory without tag filter, only two categories (cat1 and cat2) and without two specific experts (ID 100 and 101)[cmed_expert filter_tag="0" cats="cat1,cat2" exclude_ids="100, 101"]
  • Directory with the list view with only experts that speak English or Japanese - [cmed_expert view="list-view" languages="english,japanese"]

Single Expert

Show a widget containing basic information about a single expert on any page or post.

  • Shortcode: [cmed_single_expert] - display single Expert.
  • Attributes:
    • slug - the slug name of the expert (the last part of the url).

Example

[cmed_single_expert slug="expert1"]

Displaying single expert - WP Member Directory Plugin
Displaying single expert

Category List

  • Shortcode: [cmed_category_list] - display category list.
  • Attributes:
    • count - Whether you want to display category elements (0/1)
    • columns - Number of columns (1-6)
    • category - Display list of Category terms (0/1)
    • expertise - Display list of Expertise terms (0/1)
    • service - Display list of Service terms (0/1)
    • language - Display list of Language terms (0/1)
    • tag - Display list of Tag terms (0/1)
    • hide_empty - Whether to display categories with posts assigned (0/1)

Example

Category list with four columns, including (not hiding) empty categories) - [cmed_category_list columns="4" hide_empty="0"]

Displaying a category list - WordPress Employee Directory
Displaying a category list

Show Random Expert

Note: this shortcode was introduced in version 2.2.6.

  • Shortcode: [cmed_expert_random] - Show random experts.
  • Attributes:
    • limit - How many experts are listed. Set "1" to follow default settings of how many experts to show.

Example 

[cmed_expert_random limit="3"]


Show Random Promoted Experts

  • Shortcode: [cmed_promoted limit=""] - Show random promoted experts.
  • Attributes:
    • limit - How many experts are listed (default is 1)

Example 

[cmed_promoted limit="4"]

Learn more about promoted experts: WordPress Member Directory Plugin (CMED) - Add Expert


Use: Displays search box

Shortcode: [cmed_expert_searchbox]

Attributes:

  • placeholder_text - text to be shown as default in search box

Example

Example: [cmed_expert_searchbox placeholder_text="Search"]

Search field - WordPress Members Directory
Search field

CM Star Rating

Note: this shortcode works only if the option Enable ratings is enabled in plugin settings.

  • Shortcode: [cmed_cm_star_rating] - display rating.
  • Attributes:
    • ratingfor - whether to show rating for specific post (post ID)
    • disablerating - whether to disable rating ("0" to disable)
    • hideaverage - whether to hide average note ("0" to disable)
    • hidecount - whether to hide ratings count ("0" to disable)
Star rating - WordPress Staff Directory Plugin
Star rating

Expert Page Shortcodes

Learn more about Expert Page Shortcodes in this guide: WordPress Member Directory Plugin (CMED) - Expert Page - Shortcodes

Supported HTTP GET Variables

  • page_expert - How many experts should be displayed on one page.
  • cmcats - Set as a value the slug of a category to display experts that belong to that category.
  • cmtags - Set as a value the name of a tag to display experts that belong to that tag.

For example, we need to display list of experts with pagination, and every page can containt 10 experts maximum. The link should look like this: http://your-domain/expert-directory-path/?page_expert=10


More information about the WordPress Member Directory Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.