Registering multiple menues in header – both show same content
-
I created two menues in my header.php file for my theme. They are registered in the functions.php file.
If I now open the page, both menues are filled with the same content – even tough I made a different menue for each position.
header.php :
<div class="menuleft"> <nav> <?php wp_nav_menu( array( 'menu'=>'hauptnavigation', 'menu_class'=>'mainnav', 'container'=>'nav') ); ?> </nav> </div> <div class="menucenter, col-33"> <nav> <?php wp_nav_menu( array( 'menu'=>'hauptnavi2', 'menu_class'=>'mainnav', 'container'=>'nav') ); ?> </nav> </div>
functions.php :
function register_menus(){ register_nav_menus( array( 'hauptnavigation' => 'Hauptnavigation' , 'hauptnavi2' => 'HauptnavigationFolge' ));} add_action( 'init', 'register_menus');
What could the problem be?
Thank you for your help, I guess I just made a stupid fault and can’t see it after hours of trying.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Registering multiple menues in header – both show same content’ is closed to new replies.