BuddyDev

Search

Community Builder allows you to embed list of BuddyPress users using simple shortcode in the WordPress editor.

[bp-members-list]

Usage:-

Display 10 recently active members

[bp-members-list max=10]

Display 10 recent active members with avatar size 90px

[bp-members-list max=10 avatar_size=90]

Here is a screenshot:-

bp-member-list-shortcode-10-users

Here is another screenshot showing the display=extended option being used.

bp-member-list-extended-shortcode

Options

display

(string) (optional) The list display type. If not included it will display the members as list. You can use the following options to use specific display types:

  • list :-show as an unordered list
  • links :- show as list of links.
  • extended:- use the theme’s members loop layout.

per_page

(int) (optional) How many items to display. Default is 20

include

(string) (optional) Comma separated list of user id’s to include in the list.

exclude

(string) (optional) Comma separated list of numeric user ids to exclude from the list.

user_id

(int) (optional) If you want to display friends list of a user, specify the user id.

member_type

(string) (optional) Comma separated list of one or more member types to restrict the list to.

member_type__not_in

(string) (optional) Comma separated list of member types which will not be included in the list.

meta_key

(string) (optional) Filter the list by specifying user meta key.

meta_value

(mixed) (optional) Filter the list by using meta key and value. meta key must be specified to use this option.

avatar_size

(int) (optional) Size of avatar to display in case of the display list,links. defaults to 32.