Shortcodes

Limit content visibility

These shortcodes are used to limit the visibility of the content they enclose:

  • [groups_member]
  • [groups_non_member]
  • [groups_can]
  • [groups_can_not]

Example:

[groups_member group="Gold"]
Only members of the Gold group can see this.
[/groups_member]


Show group information

  • [groups_group_info]

This shortcode takes 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
  • single : (optional) used when show="count" and there is 1 member in the group
  • plural : (optional) used when show="count" and there is more than 1 member in the group, must contain %d to show the number of members

Examples:

  • [groups_group_info group="Registered" show="count"]
  • There [groups_group_info group="1" show="count" single="is one member" plural="are %d members"] in the [groups_group_info group="1" show="name"] group.


Let a user join a group

[groups_join group="X"]

This shortcode takes the following attributes to let a user join a specific group:

  • group : (required) the group ID or name
  • display_message : (optional) whether to show a confirmation after joining the group; accepted values: true, false; defaults to true
  • display_is_member : (optional) whether to show that the user is a member of the group; accepted values: true, false; defaults to false
  • submit_text : (optional) specify to change the button text; must contain %s to show the group name


Let a user leave a group

[groups_leave group="X"]

This shortcode takes the following attributes to let a user leave a specific group:

  • group : (required) the group ID or name
  • display_message : (optional) whether to show a confirmation after leaving the group; accepted values: true, false; defaults to true
  • submit_text : (optional) specify to change the button text; must contain %s to show the group name


Show user groups

  • [groups_user_groups] – This shortcode lists the current user’s or a specific user’s groups.


Attributes:

  • user_iduser_id or user_login or user_email identify the user, if none of these is given, groups for the current user are listed
  • user_login – …
  • user_email – …
  • 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 groups from display
  • format – (optional) one of list div ul or ollist and ul are equivalent; defaults to list
  • list_class – (optional) class applied to the list
  • item_class – (optional) class applied to the list items
  • order_by – (optional) name (default) or group_id
  • order – (optional) asc or desc


Show site groups

  • [groups_groups] – This shortcode lists the site’s groups.


Attributes:

  • format – (optional) one of list div ul or ollist and ul are equivalent; defaults to list
  • list_class – (optional) class applied to the list
  • item_class – (optional) class applied to the list items
  • order_by – (optional) name (default) or group_id
  • order – (optional) asc or desc


Please follow the Support guidelines.

Premium Support is available for customers in the Forums.