12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Jun 16, 2022

[Condition] Is Current Term a Parent?

Sridhar Katakam

This members-only tutorial shows how to register a custom condition in Oxygen to output elements if the current term archive page being viewed on the front end has sub/child terms i.e., if it is a parent term.

false option makes it possible to output elements if the current term archive does not have children i.e., if is not a parent term.

The condition will be added under the "Archive" category in the Conditions dialog and can be used for built-in terms like categories and tags as well as custom taxonomy terms as long as hierarchical support is present for the taxonomy.

Step 1

Install and activate a code snippets plugin like WPCodeBox.

Create a new frontend-only snippet.

Title: [Condition] Is Current Term a Parent?

This is a premium members-only content.

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

Already a member? Log in below or here.

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