Error: Duplicate Custom Navigations
-
Hi everyone,
hope you can help me out, because I’m stuck with this for almost two days now.
I made a theme with three custom navigations, one in the header, two in the footer. Problem is: when I view the page, all three locations show the same menu and not the attributed ones.
The code for my functions.php is:
function register_my_menus() { register_nav_menus( array( 'header' => __( 'Header Menu' ), 'footer_left' => __( 'Footer Left' ), 'footer_right' => __( 'Footer Right' ) ) ); } add_action( 'init', 'register_my_menus' );
The code in my footer.php is (the header navigation is positioned absolute):
<?php wp_nav_menu( array('footer_left' => 'Footer Left' )); ?> <?php wp_nav_menu( array('footer_right' => 'Footer Right' )); ?> <?php wp_nav_menu( array('header' => 'Header Menu' )); ?>
As far as I can see, the menus are setup properly in the WordPress backend. Any ideas what I am doing wrong here? Any help is appreciated.
Thanks in advance!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Error: Duplicate Custom Navigations’ is closed to new replies.