I’m looking to be able to find the depth of a term within it’s hierarchical tree.
Produce
-- Vegetables
---- Carrot
---- Onion
---- Celery
-- Fruit
---- Apple
------ HoneyCrisp
----Orange
Produce is level 0 (or 1), Fruit is level 1, Apple is 2, HoneyCrisp is 3, etc.
Ideal usage is $depth = get_term_depth( $term_id );
. Anyone have experience with this?
I essentially want a different rendering depending on depth on a term archive page.