'depth'=>-1
will show all the levels (source^):
$depth
(integer) (optional) How many levels of the hierarchy are to be included where0
means all.-1
displays links at any depth and arranges them in a single, flat list.
Default: 0
So your code will be:
<?php if (has_nav_menu( 'secondary' )) {
wp_nav_menu( array(
'container' => '',
'menu_class' => '',
'menu_id' => 'menu-header-menu',
'items_wrap' => '<ul id="%1$s">%3$s</ul>',
'depth' => -1,
'theme_location' => 'secondary' ) );
}
And DRY - Don't Repeat Yourself. As the default value of fallback_cb
is wp_page_menu
, you don't need to repeat it. So do the container_class
. And there's no such sort_column
parameter in wp_nav_menu()
.
EDIT
###EDIT### YouYou must put
register_nav_menus( array( 'secondary'=>__('Secondary Menu', 'text-domain') ) );
in your functions.php
register the nav menu so that you can assign your menu to this location. Even though you create a new menu from Appearance » Menus, if you not assign it to the desired location, then you can't enable it to there.