Published on May 17, 2021

Checking if the post has a taxonomy term in Oxygen

Sridhar Katakam

This members-only tutorial shows how the built-in Dynamic Data condition of Oxygen can be used to output elements only if the current post has at least 1 term in the specified taxonomy.

Example: Let's say you are showing the list of presentations (a custom post type) using a Repeater and you want a Div to be output only if the presentation has one or more presentation categories (custom taxonomy) ticked.

Add a condition to your desired element.

Select Dynamic Data from the "Other" category, then Advanced > PHP Function Return value.

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $499 one-time).

Already a member? Log in below or here.

tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-omagnifiercrossmenuchevron-downarrow-right