[memb_is_group_member]
Description
Checks group membership via groups_is_user_member() for the given
group_id (resolving user_id from the attribute or the current
user). The not attribute inverts the result.
When the BuddyPress Groups component is inactive, admins see a diagnostic notice and everyone else sees nothing.
Shortcode Examples
[memb_is_group_member group_id="5"]Welcome, group member![/memb_is_group_member]
Inverted:
[memb_is_group_member group_id="5" not="true"]Join our group to see this.[/memb_is_group_member]
Shortcode Parameters
group_id
BuddyPress group ID. Required. Default: 0.
user_id
User ID to check. Default: 0 (current user).
not
Inverts the result. Default: false.
Shortcode Attributes
| Attribute | Value |
|---|---|
| Conditional | Yes |
| Nestable | No |
| Accepts formatting | Yes |