Primary

[groups_user_groups]

Show user groups

This shortcode lists the group(s) the current user belongs to, or a specific user’s groups.

The following optional attributes can be used:

  • user_id : displays groups for the user identified by user_id; if not specified, it shows groups of the current user.
  • user_login : displays groups for the user identified by user_login; if not specified, it shows groups of the current user.
  • user_email : displays groups for the user identified by user_email; if not specified, it shows groups of the current user.
  • group : one or more group names or IDs, separated by comma; limits the groups displayed to those indicated
  • exclude_group : one or more group names or IDs, separated by comma; excludes indicated groups from display
  • format : format of the HTML output of groups list; available options are: "list""div""ul" or "ol" – "list" and "ul" are equivalent; defaults to "list"
  • list_class : CSS class applied to the list
  • item_class : CSS class applied to each list item
  • order_by : groups list is ordered by "name" (default) or by "group_id"
  • order : order option can be "asc" or "desc"