Usage:

This shortcode determines the content to be included based upon the evaluation of a conditional.

The purpose, definition, and use of conditionals is explained in detail here:
Conditionals

Parameters:

idThe conditional id to be evaluated.
Default: none.
Required: yes.

To ensure compatibility with the various page builders we recommend that no quote delimiters are used to specify the id parameter.

Quotes are not needed for this shortcode as there can never be any spaces in the id.

Validity:

This shortcode is evaluated for any type of visitor.

Please be aware that if the conditional specified by the id is not published/active this shortcode will not be evaluated and will not display/include any content.

Conditional Branching:

[ELSE_is_conditional] conditional branching is supported.

Nesting:

Shortcode nesting is supported:
[mbr_is_conditional1] thru [mbr_is_conditional19]
[ELSE_is_conditional1] thru [ELSE_is_conditional19]
[/_is_conditional1] thru [/_is_conditional19]

Examples:

  1. Display “Message 1” if the conditional with id 123 evaluates to TRUE:
  2. Display “Message 1” if the conditional with id 123 evaluates to TRUE. Otherwise display “Message 2”:
  3. Display in this order of priority “Message 1” if the conditional with id 123 evaluates to TRUE. Else display “Message 2” if the conditional with id 456 evaluates to TRUE. Else display “Message 3” if the conditional with id 456 evaluates to FALSE. Else display “Message 4” if the conditional with id 123 evaluates to FALSE.
  4. Display in this order of priority “Message 1” if the conditional with id 123 evaluates to TRUE. Else display “Message 2” if the conditional with id 456 evaluates to TRUE. Else display “Message 3” if the conditional with id 123 evaluates to FALSE.

API:

The PHP API function equivalent for this shortcode is:

where id is an integer and the post_id of the conditional custom post.