Footer menu displays wrong menu
-
Hi there!
I’m trying to add a custom menu to my footer by adding a widget to the footer 1-4 sections. A menu does display, but it is not the right one (the primary menu shows up).
For your information:
I registered a menu with the following code:
function register_my_menus() { register_nav_menus( array( 'footer-menu' => __( 'Footer menu' ), ) ); } add_action( 'init', 'register_my_menus' );
Thereafter I created a new menu through appearance > menu’s , selected my menu location en saved it. Then I created the custom menu widget in the footer and selected the menu. To check if it showed up without using the widget I pasted this code in my childtheme’s footer.php:
<?php wp_nav_menu( array( 'theme_location' => 'footer-menu' ) ); ?>
But that still doesn’t do the trick. What am I overlooking?
Hope you can help!
Kind regards Eline
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Footer menu displays wrong menu’ is closed to new replies.