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 byuser_id
; if not specified, it shows groups of the current user.user_login
: displays groups for the user identified byuser_login
; if not specified, it shows groups of the current user.user_email
: displays groups for the user identified byuser_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 indicatedexclude_group
: one or more group names or IDs, separated by comma; excludes indicated groups from displayformat
: 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 listitem_class
: CSS class applied to each list itemorder_by
: groups list is ordered by"name"
(default) or by"group_id"
order
: order option can be"asc"
or"desc"