[memb_has_any_tag]
Description
Conditional shortcode to control access to portions of a post, page or widget based on the logged in user's tags. Displays the enclosed content when the current user has at least one of the specified tags.
Administrators always see the content regardless of tag status.
Shortcode Examples
To display a message if someone has a tag:
[memb_has_any_tag tag_ids="123"]Message[/memb_has_any_tag]
To display a message if someone has a tag and a different message if they don't have the tag:
[memb_has_any_tag tag_ids="101,102"]
Shown to users with these tags
[else_memb_has_any_tag]
Shown if user doesn't have specified tags
[/memb_has_any_tag]
Shortcode Parameters
tag_ids
A comma separated list of tag IDs. The condition passes when the user has at least one of them. Prefix an ID with a minus sign to exclude: if the user has any excluded tag, the condition fails.
not
Inverts the result. Default: false.
Shortcode Attributes
| Attribute | Value |
|---|---|
| Conditional | Yes |
| Nestable | Yes |
| Accepts formatting | Yes |