Conditionals are a WordPress custom post type. Conditionals support categories so can be grouped using any chosen hierarchical structure.
Managing conditionals is done in exactly the same way as with any standard WordPress post/page.
Conditionals can be listed, edited, and managed along with their categories from the WordPress administrator main navigation.
Accessing Conditionals
- You can access the full list of conditionals from the WordPress administrator main navigation.
- Within the listing for each conditional you can see the types of conditions used in its definition.
- Within the listing for each conditional you can see the condition logic used with the conditions.
- Within the listing for each conditional you can see the conditional id.
- The conditional category that the conditional is assigned to is also shown.
Editing & Deleting Conditionals
- When you hover over a conditional in the listing you will see the links to edit, quick edit, and trash (delete) the conditional.
Quick edit is available to easily change the status of the conditional between published and draft which is the equivalent of activate and deactivate.Draft conditionals will always evaluate as TRUE.
Understanding The Conditional Listing
Please ensure you review the following important information regarding the status and evaluation of conditionals and their associated conditions.
The conditional listing shows/highlights critical information:
- If a conditional is shown as being in draft the conditional wherever it is used/referenced will always evaluate as TRUE irrespective of its individual conditions.
- Any condition listed and shown with only a name and no suffix indicates the condition is active.
- Any condition listed and shown with a name and with a suffix of (inactive) indicates the condition is inactive and will, therefore, be ignored in the evaluation of the conditional.
- Any conditional dependent upon a third party plugin such as WooCommerce or LearnDash will have a suffix of (WARNING) if the plugin is deactivated. In such a situation we would recommend the plugin is immediately made active to retain the integrity of the conditional.
A message stating the dependent plugin is deactivated will also be shown.
Such a condition will be ignored in the evaluation of the conditional.Be aware, that if you save a conditional containing any conditions dependent upon a third party plugin, that those conditions will be deleted if that plugin is deactivated at the time of saving.
Conditional Categories
Conditional categories can be added, assigned, and managed in the same way as any WordPress category so is not documented here.