Multiple menu locations showing same menu
-
I am creating a custom theme from scratch, and having issues with registering multiple menu locations. Note that I have created other custom themes with multiple menus and they all work fine!
Basically, the same menu is showing up in all three menu locations. I’ve tried deactivating all plugins to no effect.
I am working in a multisite environment. The site is currently a subdomain of a separate website, but we will give it a unique URL when it’s complete. The site is https://outcomes.campuscareercoach.com/
Here’s the code from my functions.php file:
register_nav_menus( array( 'header-nav' => 'Main Nav, Header', 'footer-learn' => 'Main Nav, Footer', 'footer-help' => 'Help Nav, Footer' ) );
The first menu, “header-nav” is in the header.php file. It works great:
<?php $header_nav = array( 'theme_location' => 'header-nav', 'container' => false, 'depth' => -1 ); ?> <?php wp_nav_menu( $header_nav ); ?>
Then, in the footer.php file, I place the two other menus. These are the two that aren’t working. They just repeat menu items of the “header-nav” menu.
<?php $footer_learn = array( 'theme-location' => 'footer-learn', 'container_id' => 'footer_left', 'items_wrap' => '<ul><li class="white"><strong>Learn More</strong></li>%3$s</ul>', 'depth' => -1 ); ?> <?php wp_nav_menu( $footer_learn ); ?> <?php $footer_help = array( 'theme-location' => 'footer-help', 'containter_class' => 'none', 'container_id' => 'footer_left2', 'items_wrap' => '<ul><li class="white"><strong>Survey Help</strong></li>%3$s</ul>', 'depth' => -1 ); ?> <?php wp_nav_menu( $footer_help ); ?>
The WP Admin is showing that I have three menu locations registered, and I have a separate menu assigned to each location. You can see a screenshot here.
I would appreciate any and all help!
- The topic ‘Multiple menu locations showing same menu’ is closed to new replies.