My WordPress menus are not showing up on the search results page. I am registering the locations like:

register_nav_menus( array(
    'primary' => 'Primary Menu',
) );

And calling the menu locations with:

wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'primary-menu' ) );

The menu appears on all pages as expected but is completely invisible on the search page. The markup generated by wp_nav_menu is not being generated. There are no errors in the log.

Read more here: WordPress menu is not showing on the search results page


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: