I deleted all menus from the customizer. I have only one location in my theme – “primary”. I created a new menu “main” with one menu item “home” with a link to the url of the site. I assigned the main menu to the primary location in the customizer.
In my theme file header.php this function (below) causes the old primary menu to appear with two menu items for the default pages blog and front page.
wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘menu_id’ => ‘main’ ) );
If I comment out that function the menu disappears.
Does anyone know why my menu is not showing and why the old menus are still there? I’ve looked in the database with phpmyadmin and my “main” menu is there. How do I get rid of the old and get my menu to display?
Read more here: wordpress wp_nav_menu – default menu tied to pages