Conditionals are a WordPress custom post type. Conditionals support categories so can be grouped using any chosen hierarchical structure.
Adding and managing conditionals is done in exactly the same way as with any standard WordPress post/page.
Conditionals can be listed, created, and managed along with their categories from the WordPress administrator main navigation.
Add A New Conditional
- To add a new conditional either click Add New in the WordPress administrator main navigation, or in the Conditionals listing.
- Specify a title for your conditional. It is best to make this somewhat descriptive, or to your chosen naming convention, to aid selection when required.
- Select your chosen Condition logic for this conditional.
AND – ALL conditions set to define this conditional must evaluate to TRUE for the conditional to be TRUE. If ANY one condition evaluates FALSE the conditional is FALSE.
OR – ANY conditions set to define this conditional must evaluate to TRUE for the conditional to be TRUE. If ALL conditions evaluate FALSE the conditional is FALSE.
If only one condition is set for the conditional the conditional logic chosen is not relevant. Condition logic only applies when multiple conditions are set for the conditional.
- To set a Condition first select the required Condition type.
For detailed instructions on how to set a condition using any of the available condition types follow the links below:
- Contact tag status
- Contact field comparison
- User login status
- User role status
- PHP statement
- Predefined conditional
- GamiPress user status
- Learndash user status
- WooCommerce user status
- Select Add Condition to define an additional condition to be used in the Condition set when evaluating the conditional.
Then repeat step 4.
Dependent upon previous selections you may need to expand the condition to see all options for selection, click on the arrow indicated by label A in the image above.
There is no limit to the number of conditions that can be added/set/defined for a single conditional.
- Add any notes you wish to explain or detail the conditional. These are for internal use only and are not displayed nor used elsewhere.
- Select a category for the conditional if required.
- Click Publish to make the conditional active. If you prefer you can Save Draft however this also makes the conditional inactive.
Removing A Condition
You can remove a condition from the conditional by moving your cursor into the condition title area. A Remove link will then be shown that when clicked will remove the condition.
The Remove link is only shown if more than one condition is defined for the conditional.
You can reorder conditions by moving your cursor into the condition title area. The cursor will show as a cross-hair and on holding down the left mouse button you can drag the condition and release to change the order.
The conditional is evaluated in the order of the conditions. However reordering is available to solely aid the management of the conditions you have set.