Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a theme where I register multiple menus in function.php. All menus have a unique name and a simple description (we just use the name of the theme so they all have the same desc but thats ok).

In our templates we use the following code

wp_nav_menu(array('theme_location' => 'sub_menu_manager', 'menu' => 'Manager', 'sort_column' => 'menu_order', 'container_class' => 'manager-menu', 'menu_class' => 'template-menu'));

Can someone explain what 'menu'=> 'Manager' does please? Thanks

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

The menu parameter is to get The menu that is desired and it accepts (matching in order) id, slug, name.

meaning in your case that the desired menu is named Manager but the theme_location parameter as the last word so if no menu is set in that location the menu will be the one named Manager

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.