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?
- Display Menu Name using wp_nav_menu
- How to limit wordpress menu depth in admin panel
- 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?
- 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?
- How to add (css) classes to only one wp_nav_menu()?
- Replace Home with image link inside custom header menu
- Displaying wp menus by name without using theme locations
- How do I add a post to a menu
- 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?
- how to set more than one menus to the same theme location
- Where is definied the theme location for the main menu in a WordPress template?
- How to remove class attributes from custom menu markup?
- menu behavior is not as expected
- Part of Menu Item Hidden on Header Menu
- which is the best way to customize nav-menu-template.php?
- Get Current Menu Location inside Nav_Walker
- WordPress navbar with logo in middle [closed]
- My Admin bar covers my sticky navbar [closed]
- 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
- Single-level menu option? Another way?
- 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
- Show woocommerce categories on my theme menu styling
- Why does has_nav_menu return false when get_registered_nav_menus shows the opposite?
- Redirect to another page using contact form 7? [closed]
- 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?
- How to Create custom xml file for demo content for custom theme?
- How to add menù section to my WordPress template?
- How can i make multilevel menu in wordpress theme with bootstrap
- Navbar- disable “onClick” drop-down
- Adding content inside the anchor tags within WordPress main nav
- How to Emulate Default Navigation Menu Behaviour in a Custom Theme?
- Sample Theme Options page for Multisite – what to consider
- Some doubts about WordPress handle the horizontal main menu visualization
- Get themes’s images path in WordPress Multisite
- Does wordpress add their own classes into nav menus?
- Custom menu: Link names
- Parent/Child pages
- How to substitute old wordpress menu by wp 3 menu the right way?
- Why do sticky posts show in this menu?
- Archives and Categories in Custom Menu
- how to create/register menu items that can be added to menus later
- 3 Level Menu Navigation (3rd Level not displaying)
- Use instead of for wp_nav_menu()
- Theme: dropdown hover menu not showing up in IE/Edge
- fetch all post from wp multisite network and sort all the post in descending order on the basis of “Created by ” term
- Pages not displaying as sections on static page
- How to make menus, footer, sidebars multi language
- Let user publish posts on community page
- Need help with adding custom wordpress menu and sub-menu
- HTML TO WP Theme : Submenu goes down wp_nav_menu
- wp_nav_menu custom walker class
- Conditional Nav Menu Inside Nav Menu Across Multisite Sites
- Fallback dosen’t work when not using ‘menu’ attribute
- How to add custom nav_menu_css_class to certain menu only?
- WordPress doesn’t recognize submenus as so I can’t style them properly
- Primary Menu Showing All Pages With No Sub-Nav
- Mutlisite in wordpress is not working
- wp_nav_walker that interacts with widgets to setup mega menu
- How to add drop symbol to parent nav items which have child
- background_image support multiple image size?
- child comments not displaying as nested
- WordPress 3.9 two menus in same position?
- How can I demonstrate themes well?
- How can I change the title of the Home link in the navigation bar?
- Custom link color or stylesheets
- How to make navigation a list without a plugin? [duplicate]
- How to highlight current menu bar base on the URL?