Menu displaying ALL pages in header and footer
-
Hi everyone,
I uploaded my site from my localhost to a web server, and the menu got all messed up. I’ve been looking on other threads but haven’t found the exact same issue.
Here’s the deal:
I created my template and menu from scratch. My menu (now after uploading it on a live testing site) displays all links of pages even if they don’t belong to either menu. All links are displaying in both Header and Footer menus.This is how I registered my menus in my functions.php:
// Navigation Menus
register_nav_menus(array(
‘primary’ => __( ‘Primary Menu’),
‘footer’ => __( ‘Footer Menu’),
));Here’s what I put in the header.php:
<nav class=”site-nav primary-menu”>
<?php $args = array(‘theme_location’ => ‘primary’);?>
<?php wp_nav_menu( $args ); ?>
</nav>And the footer.php:
<nav class=”site-nav”>
<?php $args = array(‘theme_location’ => ‘footer’);?>
<?php wp_nav_menu( $args ); ?>
</nav>I would appreciate any help,
Thanks,
Dan.
- The topic ‘Menu displaying ALL pages in header and footer’ is closed to new replies.