# Nav menu walker depth

**URL:** https://discourse.roots.io/t/nav-menu-walker-depth/397
**Category:** uncategorized
**Created:** 2013-09-23T10:44:12Z
**Posts:** 2

## Post 1 by @dutchiexl — 2013-09-23T10:44:12Z

Hi, How can I override the roots nav walker depth ? I would like to set the depth to 1 without changing the roots base code.

```
function roots_nav_menu_args($args = '') {
  $roots_nav_menu_args['container'] = false;

  if (!$args['items_wrap']) {
    $roots_nav_menu_args['items_wrap'] = '<ul class="%2$s">%3$s</ul>';
  }

  if (current_theme_supports('bootstrap-top-navbar') && !$args['depth']) {
    $roots_nav_menu_args['depth'] = 2;
  }

  if (!$args['walker']) {
    $roots_nav_menu_args['walker'] = new Roots_Nav_Walker();
  }

  return array_merge($args, $roots_nav_menu_args);
}
```

---

## Post 2 by @Foxaii — 2013-09-23T14:40:54Z

Manually [set the depth argument](http://codex.wordpress.org/Function_Reference/wp_nav_menu) when you call the menu, as you would with any other theme.
