Shortcode:-

You can use the short-code [bp-user-badges] to list all members with a specific badge.

The short-code provides following options:-

slug:- It is required. It is the slug of the badge. For Role/Member types based badge, It is the role name e.g “administrator” or the member type name.

Example:- List all members with badge slug “king”

[bp-user-badges slug='king']

context:- Optional. Only required when listing for role or member type based badges. Possible values are ‘role’ or ‘member_type’

Example:- List  5 users who have badges for “Author” role(or who have author role).

[bp-user-badges slug='author' context='role' max=5]

Example:- List 5 users who have “student” member type badge.

[bp-user-badges slug="student" context="member_type" max=5]

You should not specify context for custom badges.

view:- Optional. Possible values are “list”, “default”. It decides how the list will be displayed as a block of avatar of a vertical list of users.

Example:-

[bp-user-badges slug="king" view="list"]

max:- Maximum number of users to list

Example:-

[bp-user-badges slug="king" max=5]

 

[displayed-username]

[displayed-user-id]

[logged-user-profile]

[site-url]

[blog-url]

[displayed-user-profile]friends/requests/

[site-url]

[blog-url]

Buddy Press Member Shortcodes

[members-listing]