wp_nav_menu
takes an optional argument called menu
, which will fetch any menu by name, slug or ID.
If you just want post objects (or anything but the menu HTML), wp_get_nav_menus
is the way to go. Otherwise, use wp_nav_menu
. If you need it to return the menu HTML instead of echoing, there’s an argument for that as well: echo
.
Related Posts:
- How to call “page specific menu items” in template [closed]
- Include Max mega menu Plugin into theme
- Redirect to another page using contact form 7? [closed]
- How can I add different menus (different style menu) on each page?
- Is it possible to stop selected plugins from loading on certain template pages?
- Hide wordpress plugins from list
- Adding a text domain to every __(), _e() and __n() gettext call without a plan to create own translations
- Custom wp_nav_menu output (displaying all child elements of top menu element in current branch)
- Which functions in theme or plugin load first
- How to hide fields from my user profiles
- How to make my plugin theme-independent?
- wp_nav_menu(); Outside WordPress installation
- Add custom buttons with custom actions in Edit Post screen in WordPress?
- Autoload via composer in plugin interference
- Is there a quick way to inject i18n domain into theme/plugin files?
- Popup Maker nav menu item not working
- Creating a menu page in a Object Oriented developed plugin
- WordPress language switcher
- Showing Co-Authors on post page
- WP theme with Backbone
- How to include plugin without activation?
- How use %like% in sql statement wordpress
- Custom Taxonomy Tag Search
- wordpress theme backend admin only
- Check if we’re viewing an event
- Wondering what these multi-colored extra pages are?
- How does WP handle multiple matching rewrite rules?
- Events Made Easy Plugin – Duplicate Title Tags
- What is the correct way to update both WP/plugins/themes without breaking the site?
- Not getting author rank when using return
- how to give a user a role?
- Creating a nav menu
- Classified ad website : which solutions to use? [closed]
- Making sure that a plugin’s scripts and stylesheets are included for dynamicaly loaded content
- html generated by theme exist but doesnt appear in browser
- Finding the URL to be used to check if plugin is installed with a theme
- Center and hide overflow of WP toolbar custom links
- How to remove admin main menu name repetition
- How to use my menu PHP code as sidebar?
- Overriding Parent Theme… will cause plugins failure?
- Hide a Menu Item on Login
- Customizing Titles on the Fly with Code
- Add SideBar/Widgets Just Below the Post
- Add filter on html tags,attributes on specific function in wordpress
- Shortcode Attributes to Return different $_POST
- How to use the CSS of the WordPress core in the development of my administration page?
- Include Minit plugin in theme [closed]
- Managing wordpress Themes & plugins for multisite
- WordPress custom post type image in RSS
- Add user meta after a user has registered and logged In [closed]
- Inserting Plugins Into Blank Space of Externally Designed WordPress Theme
- Hook on creating a menu entry?
- display unique post per category
- How to add an admin alert for missing plugins
- navigation among single posts
- Is there a way to insert multiple images into a post at the same time without using a gallery?
- Yoast SEO Plug In and my Theme duplicating code. Need some feedback on what to do? [closed]
- Button and Countdown overlapping mobile menu
- How to get authors who have added the post in the specific custom post type
- woocommerce remove coupon link does not work
- require_once not working in plugin wordpress
- need to find duplicated meta value in custom filed and view the posts that have the same value
- Slideout submenu in mobile
- How to override any plugin file in the child theme
- how to display recent post by category on home page
- Display posts by alphabetical order
- submit two file input fields in the same form
- Mobile Menu and Mobile Sidebar missing
- WP Forms not displaying,becomming an fatal error
- How to Add call button on a featured image in a wpsite? check the slap king image, there are two buttons on the featured image
- WordPress hierarchy clarification, does post_type_archive take precedence over taxonomy-term archive?
- How can I find related learndash course id from woocommerce product object?
- How to get a post views count using ‘WordPress popular posts’ plugin
- Using Shortcode Result In Custom HTML Block (Using Google Sheet JQuery Result As NumScroller data-max)
- Create survey that redirects to sidebar menu customized to answers
- Circular Menu to show on pages
- Disqus comment system not show
- How to use plugin’s shortcode in custom design? [closed]
- How to disable users to view Other pages
- Product catalogue in WordPress
- Contact form function should be in functions.php or in a plugin file?
- how to add custom css at top above all css file for specific url
- How can I add a custom checkbox / radio button on the admin theme options to display a CSS or other?
- How to assign plugin to top level menu?
- Adding icons next to categories in wp_nav_menu
- Showing ads in the specific category and its sub-categories
- WP Super Large Menu Problem
- Category archive in menu
- How to activate/deactivate menu tab and keep the same id?
- How can I make a website with dynamic features with wordpress?
- How to validate password length in wordpress
- How to add image for custom taxonomy
- Why plugin’s icon for the menu not found?
- Integrating WordPress Content into a jQuery Slider
- Detect if you’re in the “Frontend Editor” mode in Visual Composer WordPress [closed]
- Can anyone tell some online tuts for plugin development for beginner? [closed]
- How to check if the Menubar contains no items?
- I want to include My theme file (testing.php) to inside my plugin folder (myplugin/mypugin.php)
- How to Enfroce Domain Licensing Limits? [closed]
- Override plugin constant using a theme