wp_nav_menu seems to be printing the wrong menu

enter image description here

I’m learning WordPress and I’m can’t understand what I’m doing wrong with a theme I’m creating. Here is how I create my menus in the functions.php file

function my_custom_theme_setup() {
    register_nav_menu('header', 'Menu that goes in the header of the website');
    register_nav_menu('footer', 'Menu that goes in the footer of the website');
add_action('init', 'my_custom_theme_setup');

And here is how I insert it the header.php:

Here is how I configured the menu in the admin interface:

Yes, the content of both menus is different. The footer menu is OK, but the header one is not. What am I doing wrong?

Read more here:: wp_nav_menu seems to be printing the wrong menu

Leave a Reply

Your email address will not be published. Required fields are marked *