get_depth()
As far as I know there is no function in Wordpress that return the page or category depth.
I created a function that returns the depth of a page or category. The depth is how many levels from the root the page or category in its hierarchy. The root level number is 0.
<? php
function get_depth($id = '', $depth ...