menu conflicts in wordpress

Asked

Viewed 32 times

0

Good morning to all!! Guys, I created a theme for a store and everything is working fine, but now I needed to create a second menu (for the footer)and when I create the links, the first menu (from the top) gets the links from the second, which is in the footer... I’m calling the menus this way:

top menu :

<?php wp_nav_menu( array('menu'=>'Topo') ); ?>

footer menu:

<?php wp_nav_menu(array('menu' => 'rodape')); ?>

and in their creation I’m doing so:

register_nav_menu('menu_principal', 'Menu Principal - Topo');
register_nav_menu('menu_home', 'Menu home - lateral');
register_nav_menu('rodape', 'menu na parte do rodape');
register_nav_menu('erro', 'erro');

Anyway, I don’t know what I’m doing wrong, does anyone have any suggestions? Thank you for your attention!! Horatio

1 answer

0


Try to call it that:

<?php wp_nav_menu( array( 'theme_location' => 'menu_principal' ) ); ?> // para menu topo

<?php wp_nav_menu( array( 'theme_location' => 'rodape' ) ); ?> // para menu rodape

Browser other questions tagged

You are not signed in. Login or sign up in order to post.