Title: walker count menu depth
Last modified: August 20, 2016

---

# walker count menu depth

 *  [wildmtsky](https://wordpress.org/support/users/wildmtsky/)
 * (@wildmtsky)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/walker-count-menu-depth/)
 * can anyone point me in the right direction to find the number of submenus per
   menu item OR the max depth of submenus? I have looked into the $depth value in
   the class-wp-walker, nav-menu, and nav-menu-template but I am afraid I am having
   a hard time interpreting how to utilize it to my needs. Essentially, I am creating
   CSS based on menus but I am not sure how many submenus there will be (it can 
   be changed) so I wanted to create a loop based on the max depth of the submenu(
   ie:
    -  menu-item
    -  sub-menu-item
 *  -  menu-item
    - sub-menu-item
    -    
    -    sub-menu-item
 * The value here would be 2 (there is a submenu item under a submenu item).
 * Any thoughts would be appreciated.

The topic ‘walker count menu depth’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [wildmtsky](https://wordpress.org/support/users/wildmtsky/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/walker-count-menu-depth/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
