Working with Conditions - If Else , If and, If or

Shortcode: aw2_if

Executes whatever is inside if the conditions match

Parameters

——————


odd: If the parameter passed is odd



even: If the parameter passed is even



empty: If the parameter passed is empty

 

not_empty: If the parameter passed has some value



request_exists: If a request (request, query var) was passed

 

request_not_exists: If a request (request, query var) was not passed

param_exists: If the parameter exists
param_not_exists: If the parameter does not exists



terms,equal . If in a comma separated string one of the values is there.
Use for checking taxonomy



cond,equal


cond,notequal


cond,greater


cond,less


cond,greaterequal


cond,lessequal

 

Shortcode: aw2_else

Execute if the If condition was false. Important :  Else assumes and works with last “if” condition that was executed. If you are using aw2_if inside aw2_if then aw2_else nearest to outer will not work correctly.

Parameters

——————–


none

Examples

——————

In following scenario aw2_else will fail, so use aw2_if with notequal parameter

 

Shortcode: aw2_and

Execute if the If condition and the And condition are both true

 

Shortcode: aw2_or

Execute if the If condition or the Or condition is true