try and add your location as a parameter.
<?php
if ( has_nav_menu( $location ) ) {
//Do something
} ?>
Related Posts:
- Menu items description? Custom Walker for wp_nav_menu()
- Add Caret to Menu Items with Sub-Menus in WordPress Theme
- Any walker causes blank menu?
- Extend walker – navigation, adding data attribute to a tag
- how to change WordPress menu markup/classes
- Custom Nav Walker to show siblings and children of current branch?
- Create self-populating menu and add extra divs to the menu layout
- Create wordpress header with custom logo in between the menu splitting the menu into two equal parts [closed]
- multisite: global menu containing network site links?
- Issue on Adding A Class to Bootstrap Navbar Walker Dropdown
- Custom Navigation build using wp_nav_menu and walker
- WordPress custom menu can’t show 3. level submenu
- WordPress menu walker – Get parent item text inside end_lvl function
- Horizontal Navigation
- How to add posts to custom menus?
- wp_nav_menu(), how to change class?
- Display Menu Name using wp_nav_menu
- How can I display a menu on certain pages only?
- How to set permalink structure via functions.php
- Add custom classes to anchor in wp_nav_menu
- How to limit wordpress menu depth in admin panel
- Strict Standards Error bootstrap navwalker
- wp_nav_menu sort order?
- How to determine if custom menu is active?
- How do I check if a menu exists?
- How to use logout function on custom menu link?
- How to display wp_nav_menu() conditionally only when not on a 404 page?
- How to add menu support to a theme?
- date_i18n() issue
- Problem with registering menus – What to do when other solutions aren’t working?
- Add a #hash to the links in my custom menu
- How can i change menu link when page content empty?
- Customize comment list markup
- Select menu on browser resize
- How to add (css) classes to only one wp_nav_menu()?
- Get last modified date for menu link
- Replace Home with image link inside custom header menu
- Displaying wp menus by name without using theme locations
- How to add nofollow to wp_nav_menu
- How to highlight the current page in the nav menu?
- How do I add a post to a menu
- Setting a Default ‘Theme Location’ When Creating a Menu
- WordPress nav_menu_css_class theme filter is not being called
- WordPress Multisite: Have the same header and footer of main-blog on all sub-blogs
- Display site admin profile fields in header.php
- Best practices: Custom theme sidebar menu – hardcode or widget?
- How do I highlight the menu for a child page?
- How to test for MU via functions.php?
- Custom Nav Walker Displaying Values in Sub Menu
- how to set more than one menus to the same theme location
- Same footer on all multisites blogs
- Excluding a page with a certain name from wp_page_menu
- CSS won’t style output of wp_nav_menu() correctly
- Where is definied the theme location for the main menu in a WordPress template?
- how to wrap tag in tag html to wordpress menu conversion
- Second menu not showing
- How to remove class attributes from custom menu markup?
- How can I disable/hide certain themes in multisite?
- 2 differen’t menus and it’s using same items in both
- menu behavior is not as expected
- Is there an action for save_menu and/or update_menu?
- Set default screen option for appearance -> menus
- Part of Menu Item Hidden on Header Menu
- Change the template of multiple multisite pages at the same time
- wp_nav_menu add something before closing container and after last list item
- Find the Children of a Page then Echo it as a Bulleted List of Links (menu)
- which is the best way to customize nav-menu-template.php?
- Is it a bad practice to use switch_to_blog in the frontend?
- Get Current Menu Location inside Nav_Walker
- WordPress navbar with logo in middle [closed]
- My Admin bar covers my sticky navbar [closed]
- Theme Development for WordPress Multisite Installation
- WordPress is adding margins and padding to my custom menu?
- Menu item added in wp_nav_menu_items filter is never highlighted
- wp_post->post_parent object returning 0
- How to make theme elements customizable in wordpress?
- Single-level menu option? Another way?
- Primary navigation menu & footer not showing in category / tag page
- Using a page as home, how do I prevent nav from setting both home and page links active?
- Problem with empty class attributes when running a filter on nav_menu_css_class
- How to append to menu items selectively
- Custom Nav Walker Trouble
- How to set the currently active page in the menu including parents
- Show woocommerce categories on my theme menu styling
- Where am I doing wrong in my theme menu?
- Override customizer values on a per-menu base
- Why does has_nav_menu return false when get_registered_nav_menus shows the opposite?
- Acivate all themes multisite wide automatically
- Recommended method for updating/adding menus when adding new theme
- Question regarding WP multisite feature
- Redirect to another page using contact form 7? [closed]
- Admin: sub menu doesnt display under apperance when activate my themes
- Featured Image meta box not showing up
- Child Theme header1.php file not overwriting parent theme’s header1.php file
- Why wp_nav_menu() doesnt show the proper meny when invoked two consecutive times?
- How to develop a menu like wwe.com?
- 3 Level Deep Navigation Menu Not Showing All Levels
- Where do files uploaded via Media Manager get stored in MU?
- Why are some of my menu items not displaying on my menu?
- How to Create custom xml file for demo content for custom theme?