0

I built a child theme of Twenty Twelve, and created a menu called "Footer Menu" in Appearance > Menus. I assigned this menu to the Footer location: enter image description here

However, the footer menu in the live site displays the same menu as Primary Menu.

I have not changed footer.php:

<footer id="colophon" role="contentinfo">
    <div>
        <?php wp_nav_menu (array ('theme_location' => 'Footer', 'menu_class' => 'footer-menu' )); ?>
    </div>

    <div class="site-info">
        Copyright &copy; Brinkley & Chesnut
    </div><!-- .site-info -->
</footer><!-- #colophon -->

Why is the wrong menu displaying in the footer?

Update

functions.php contains:

function register_my_menus() {
    register_nav_menus (
        array ('footer-menu' => __ ('Footer'))
    );
}

I changed "Footer" to "footer" in both functions.php and footer.php, but the issue remains.

1 Answer 1

0

I expect that the theme_location is "footer" not "Footer". It is case sensitive. I just checked. If you use a bad theme_location wp_nav_menu will fallback to what looks like a page menu when I test it.

Edit:

Due to additional information in the question, the theme_location is footer-menu and not footer. If you look at the Codex page for register_nav_menus you will see that it takes "An associative array of menu location slugs (key) and descriptions (according value." The array key is the menu location. That is the value you need.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.