Primary

[groups_join]

This shortcode provides an easy way for users to join a specific group. You simply indicate the name of the group and it renders a button that your users can click to join the group.

[groups_join group="X"]

The 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 are: true and false.
    Defaults to true.
  • display_is_member : (optional) Whether to show that the user is a member of the group.
    Accepted values are: true and false.
    Defaults to false.
  • submit_text : (optional) Specify this to change the button text template.
    To show the name of the group, it must contain the placeholder %s where the group name should appear.
    The default button text template is "Join the %s group".

Example

Let’s assume that you want to show specific information to users who are interested in knitting and thus have created the Knitting group. You could let users join this group when interested by placing this shortcode on a post or page:

[groups_join group="Knitting"]

The shortcode would render like this for users who do not yet belong to the group:As you can see, a simple button lets users join the group easily.