Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

term_is_ancestor_of()

3 tags 1 category

term_is_ancestor_of() — Checks if a term is an ancestor of another term. You can use either an ID or the term object for both parameters.

Inputs: $term1 (int|object): ID or object to check if this is the parent term. $term2 (int|object): The child term. $taxonomy (string): Taxonomy name that $term1 and $term2 belong to.

Returns bool: Whether $term2 is a child of $term1.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…