Different templates for each category level
While I do not know of a method already implementing this, a simple approach could be to count the amount of (grand)parents like so: function get_level($id=NULL, $taxonomy=”) { if ( ! $id) { $id = get_queried_object_id(); } $term = get_term($id, $taxonomy, OBJECT); if ($term === NULL) return 0; if ($term->parent == 0) return 1; return … Read more