Primary

[groups_group_info]

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: namedescriptioncount, and users.
  • single : (optional) The text used when show="count" and there is 1 member in the group. The default is: 1 (simply the number one).
  • plural : (optional) The template text that is used when show="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).
  • none : (optional) The text used when show=”count” and there are no members in the group. The default is: 0 (simply the number zero).

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:

There [groups_group_info group="2" show="count" none="are no members" single="is one member" plural="are %d members"] in the [groups_group_info group="2" show="name"] group.