1. Home
  2. WP User
  3. Shortcode
  4. wp_user_list

wp_user_list


[wp_user_list] shortcode for display member list/directory

You can use following attributes for filter/show member list

[wp_user_list role_in=’subscriber’ role_not_in=’author’ include=’1,2,5,7′ exclude=’55,44,78,87′ approve=’1′ size=’small’]

role_in : If you want to show only selected member role in list then set this attribute by comma separated

Ex. [wp_user_list role_in=’subscriber,author’]

role_not_in : If you want exclude to show some user roles in member list then set this attribute by comma separated

Ex. [wp_user_list role_not_in=’subscriber,author’]

include : If you want only show selected user ids then set this attribute by comma separated

Ex. [wp_user_list include=’1,2,5,7′ ]

exclude : If you don’t want show selected user ids then set this attribute by comma separated

Ex. [wp_user_list exclude=’55,44,78,87′ ]

approve : If you want show only approve user then set approve=’1′

Ex. [wp_user_list approve=’1′ ]

template : If you want change default display member list with different layout then set template= template name


Template : Currently we 2 template available for show user list

Rounded (template=rounded ): set template parameter as rounded.

Ex: [wp_user_list template=’rounded’]

Default :

Ex: [wp_user_list]


Key,Value : if you want user list display user list on particular page based on user_meta key and value then set Key and Value attribute.

If you have pages like Bride, Groom so based on user meta_key you can display or category user using this attribute

Ex:

Bride : [wp_user_list key=’gender’ value=’Female’]

Groom : [wp_user_list key=’gender’ value=’Male’]


Use above shortcode respective pages and set metaket as gender and it value male or female.

This meta key add using form builder addon and add filed for gender in register/profile form.


You can add multiple key and values in this shortcode.

Ex: If you want to add Bride page on site and only for Unmarried’ then add multiple keys and values using comma separated


[wp_user_list key=’gender,maritial_status’ value=’Female,Unmarried’]


This meta key add using form builder addon and add filed for gender and maritial_status in register/profile form.


id : If Form builder addon is Activated then filter result based on custom fields.

Create new form using form builder

Add field into form which you want to add in custom filter

Get form id from list

Set id attribute in form and set value as form id

Ex:

[wp_user_list id=’474′]

[wp_user_list id=’474′ key=’gender,maritial_status’ value=’Female,Unmarried’]
So based on this filter it will filter the result.

Was this article helpful to you? Yes No