wp_nav_menu seems to be printing the wrong menu

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() {
    add_theme_support('menus');
    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: ?php wp_nav_menu(array('menu' = 'header','menu_class' = 'header__nav'));?

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?

Topic menus Wordpress

Category Web


This is what solved the issue:

<?php wp_nav_menu(array('theme_location' => 'header','menu_class' => 'header__nav'));?>

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.