Different navigation menu for different pages
-
Hi – another hack that’s been giving me a headache: I’ve been trying to create different navigation menus to use for different (landing) pages within my WP site. I registered a secondary menu in functions.php and have created another page template as well but am struggling to tie the two together in the header.php.
Here’s how the nav menu is called in the header at the moment:
<?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'container' => false, 'theme_location' =>'main_nav', 'menu_id' => 'nav')); ?>
I think I need to use a conditional function instead of the above but not sure what it should look like. All attempts have failed up to now… Thanks to those that can help!
- The topic ‘Different navigation menu for different pages’ is closed to new replies.