Get term tree level

Use this function to get term’s tree level.

Example use:

Let’s say you have a tree like this Articles>News>Sports and you want to get Sports ( term_id is 134 ) tree level.

This will output: Sports tree level is: 2

Code Snippets
Previous Post
WooCommerce product categories widget show current children only
Next Post
Hide WooCommerce free price label