This shortcode will display a directory of your members on the frontend in a beautiful way (See live example).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=memberlist]
How to Embed This Shortcode with PHP
<?php echo do_shortcode('[userpro template=memberlist]'); ?>
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=memberlist option=value]
Search Options and Parameters
- exclude – Hide specific users from appearing in member directory. e.g. 1,3,10 will hide these users from the member list.
- search – Turn on/off member search in member directory. Default: 1 (turned on)
- memberlist_withavatar – If enabled, search will return only members with custom profile photo or avatar. Default: 0
- memberlist_verified – If enabled, search will return only Verified accounts in member search. Default: 0
- memberlist_default_search – Enable/disable the default search field in member directory. Default: 1
- per_page – How many members to display per each page. Default: 12
- memberlist_paginate – Turn on/off pagination in member directory. Default: 1 (enabled)
- memberlist_paginate_top – Show/hide pagination on top of member directory. Default: 1 to show
- memberlist_paginate_bottom – Show/hide pagination on bottom of member directory. Default: 1 to show
- turn_off_initial_results – If set to 1, this will turn off initial member results until user makes a search in the member directory. Default: 0
- memberlist_filters – A comma seperated list of custom fields to support in member directory search e.g. country,age (When search is done through the default search field – this does not set custom filters/dropdowns in member directory) Default is empty, includes default WP user search.
- sortby – A sortby parameter to sort your members in member directory. Allow all default and custom fields sort in alphabetical. Default: registered (Sort members by registration date, by default). Example : sortby=country
- order – desc or asc sorting. desc for descending and asc for ascending. Default: desc
- userpro_show_unapproved_members – If you dont want unapproved members to show up in the memberlist. Default: 1
The following shortcode options are only available for member directory (v2) memberlist_v2=1
- memberlist_v2 – This can turn on/off the member directory (version 2). Default: 1 to use the new member directory layout.
- memberlist_v2_pic_size – Control the size of member/user profile photo in member directory v2. Default: 86
- memberlist_v2_bio – Show/hide user biography or description in member directory v2. Default: 1 to show
- memberlist_v2_showbadges – Show/hide user earned badges in member directory v2. Default: 1 to show
- memberlist_v2_showname – Show/hide user display name in member directory v2. Default: 1 to show
- memberlist_v2_showsocial – Show/hide user social icons in the member directory v2. Default: 1 to show
- memberlist_v2_fields – A comma seperated list of custom fields to display in member directory v2. For example, the default value is: age,gender,country which will display user’s Age, Gender and Country. You can enter any custom fields you want seperated by a comma.
The following shortcode options are only available for member directory (v1) memberlist_v2=0
- memberlist_pic_size – Control the size of member/user profile photo in member directory v1. Default: 120
- memberlist_pic_topspace – Control the top distance between each user in pixels. Default: 15
- memberlist_pic_sidespace – Control the side distance between each user in pixels. Default: 30
- memberlist_pic_rounded – Display member photos rounded or square. Default: 1 (rounded photo)
- memberlist_width – The width of member directory div relative to its parent element. Default: 100% (full width)
- memberlist_popup_view – If turned on, user profiles will open in a modal popup. Default: 0 (open user profile directly)
Leave A Comment?