Check if current term is a child of another term
There are two problems that have thwarted your check: $term = get_queried_object()->term_id; if ( $term->parent == ‘tradeshow’ ) { Starting with: $term = get_queried_object()->term_id; Here $term contains the ID of a term, not a term object. Lets assume this is term number 5, the result is: $term = 5; if ( $term->parent == ‘tradeshow’ ) … Read more