This shortcode can be used to render information about a group, including the group’s name, its description, the number of members and its users.
It supports the following attributes to show information about a group:
group
: (required) The group ID or name.show
: (required) What to show, accepted values are:name
,description
,count
, andusers
.single
: (optional) The template text used whenshow="count"
and there is 1 member in the group.
The default template text is:1
(simply the number one).plural
: (optional) The template text that is used whenshow="count"
and there is more than 1 member in the group.
To show the number of members, it must contain the placeholder%d
where the number of members should appear.
The default template text is:%d
(simply showing the number).
Examples
These examples could be used on a page, post, etc.
In this example, we will show the number of registered users on your site:
[groups_group_info group="Registered" show="count"]
And in this example we will show the number of users in the group with ID 2, using customized texts for the singular and plural numbers:
There [groups_group_info group="2" show="count" single="is one member" plural="are %d members"] in the [groups_group_info group="2" show="name"] group.