Skip to main content

i4w_is_conditional

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 in the Conditionals documentation.

[ELSE_is_conditional] conditional branching is supported.

Shortcode nesting is supported: [i4w_is_conditional1] thru [i4w_is_conditional19] and [ELSE_is_conditional1] thru [ELSE_is_conditional19]

Parameters

ParameterDescriptionDefaultRequired
idThe conditional id to be evaluated.NoneYes

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.

Example

Display "Message 1" if the conditional with id 123 evaluates to TRUE:

Shortcode
[i4w_is_conditional id=123] Message 1 [/i4w_is_conditional]

Display "Message 1" if the conditional with id 123 evaluates to TRUE. Otherwise display "Message 2":

Shortcode
[i4w_is_conditional id=123]
Message 1
[ELSE_is_conditional]
Message 2
[/i4w_is_conditional]

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:

Shortcode
[i4w_is_conditional id=123]
Message 1
[i4w_is_conditional1 id=456]
Message 2
[ELSE_is_conditional1]
Message 3
[/i4w_is_conditional1]
[ELSE_is_conditional]
Message 4
[/i4w_is_conditional]

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:

Shortcode
[i4w_is_conditional id=123]
Message 1
[i4w_is_conditional1 id=456]
Message 2
[/i4w_is_conditional1]
[ELSE_is_conditional]
Message 3
[/i4w_is_conditional]