Primary

[groups_leave]

This shortcode allows group members to leave a group. The shortcode requires the group attribute and renders a button that the user can click to leave the indicated group.

[groups_leave group="X"]

It recognizes the following shortcode attributes:

  • group : (required) The group ID or name.
  • display_message : (optional) Whether to show a confirmation after leaving the group.
    Accepted values are: true and false.
    The default value is true.
  • submit_text : (optional) Specify this to change the button text template.
    If the group name should be displayed, the template text must contain the placeholder %s where the group name should appear.
    The default button text template is "Leave the %s group".

Example

Continuing with our example from the [groups_join] shortcode, for those who have had their fair share of knitting and want to leave the group, you could simply place this on a page:

[groups_leave group="Knitting"]

This will render a button that members of the group can click to leave the group.

The simple click of a button lets users leave the group instantly.