Skip to main content

mbr_not_for

Usage

This shortcode determines the content to be included based upon a comparison of ActiveCampaign tags that the visitor has to the conditions defined in the shortcode parameters.

An alternative to using a series of [mbr_not_for] shortcodes for ActiveCampaign tag conditions is to use the [mbr_casetag] shortcode, which can make your code both shorter and easier to manage.

Parameters

ParametersDescription
tagsOne or more tag ID's or tag names defined within ActiveCampaign and used to evaluate the condition. This condition evaluates as true if the remote user has none of the tags specified. The available tags can be found in ActiveMember360, Utilities, Tags. If more than one is entered, please separate with commas.
Default: none.
Required: yes.
Tag ID's vs. tag names

The use of tag ID's over tag names is encouraged. Unless a tag is deleted, its tag ID can be considered persistent and unique. Tag names, on the other hand, can be changed at any time and do not need to be unique. Using a tag name that is not unique or has been changed can cause your shortcode, hook or module to no longer work as expected.

Validity

This shortcode is evaluated for any type of visitor.

For a local WordPress user with the Administrator role the shortcode will always evaluate as TRUE.

For public visitors or other local WordPress users the shortcode will always evaluate as TRUE and show the content.

Conditional Branching

[ELSE_not_for] conditional branching is supported.

Nesting

Shortcode nesting is supported: [mbr_not_for1] thru [mbr_not_for19]
[ELSE_not_for1] thru [ELSE_not_for19]
[/mbr_not_for1] thru [/mbr_not_for19]

Examples

The content returned will be 'You do not have any of the tags' if the current remote user has none of the ActiveCampaign tags 123,456 or MY TAG NAME:

[mbr_not_for tags='123,456,MY TAG NAME']
You do not have any of the tags
[/mbr_not_for]

API

For ActiveCampaign tag conditions ActiveMember360 provides the PHP conditional function:

(mbr_has_tags( $tags, $mode ))

Parameters

ParametersTypeDescription
$tags(string|array)One or more tag ID's or tag names defined within ActiveCampaign and used to evaluate the condition.
Default: none.
Required: no.
$mode(string)Specifies whether the current remote user must have ANY or ALL tags specified using the $tags in order to satisfy the condition.
Permitted Values: any, all, any
Default: any
Required: no.

Return

(bool) True if the current remote user satisfies the condition. False otherwise.

API Examples:

Statement evaluates as TRUE if the user HAS tag 123.

mbr_has_tags( '123' )