Community Builder helps you to list all BuddyPress groups count or just user groups count easily with the shortcode.
[bp-groups-count]
Usage:-
Display all groups count
[bp-groups-count]
Display total groups of the logged in user
[bp-groups-count type=user ]
Options
type
(string) (optional) Which type of count to display. If not included it will display the total groups count. You can use the following options to use specific types:
- all:- show all groups count. It is default.
- user:- shows count of groups for logged in user(by default), see the ‘user’ option to show groups count for the displayed user.
user
(string) (optional) Only valid when type=’user’. Helps decide which group count should be displayed. By default, the logged in user’s group count is displayed.
- logged :- Show group count for current logged user
- displayed:- Show group count for displayed user.
class
(string) (optional) CSS class you want to apply to the count span element..