In the Condition name input area type your chosen name for this condition. If no name is input, by default, when the conditional is saved it will be named the same as the Condition type.
From the Condition status drop down select Active or Inactive as required.
Inactive conditions will always evaluate as TRUE.
From the Condition type drop down select PHP statement.
Within the PHP statement input area define the required PHP conditional statement.
Any valid PHP conditional function can be used.
You can also use any conditional tags including WordPress and WooCommerce conditional tags.
A list of WordPress Conditional Tags can be found here:
A list of WooCommerce Conditional Tags can be found here:
Here are some examples using WordPress conditional tags:
a. Statement evaluates as TRUE if the user IS on the home page.
Any function preceded with an exclamation mark ! specifies the negative use case of the function.
b. Statement evaluates as TRUE if the user IS NOT on the home page.
It is also possible to combine conditions with && (representing AND) and || (representing OR).
c. Statement evaluates as TRUE if the user IS on the home page AND the home page is the blog page.
is_front_page() && is_home()
d. Statement evaluates as TRUE if the user IS on the page titled Members Dashboard OR on the page titled My Account.
is_page( 'Members Dashboard' ) || is_page( 'My Account' )