Skip to content

i4w_select

This shortcode returns a value from a list, based on a switch variable, similar to a “switch…case…” programming construct.

[ELSE_select] conditional branching is NOT supported.

Shortcode nesting is NOT supported.

ParameterDescriptionDefaultRequired
caseA list of values, separated by ’|’ (pipe). The first item in the list is the switch value to be compared against the remaining values.NoneYes
Shortcode
[i4w_select case='2|yes|no|maybe']

Returns ‘no’ (the 2nd value after the switch).

Shortcode
[i4w_select case='maybe|yes|no|maybe']

Returns ‘3’ (the ordinal position of the matching value).