You can use wp_nav_menu($args)
to display different menus. Just pass menu ID, slug, name or object as $args['menu']
parameter.
if ( $post->ID == 2309 ) {
$args = array(
'menu' => 'some-menu'
);
wp_nav_menu($args);
}
There are also other available parameters that you can pass to the function, https://developer.wordpress.org/reference/functions/wp_nav_menu/
Related Posts:
- Adding an Arbitrary Link to the Admin Menu?
- WordPress Settings API, Implementing Tabs On Custom Menu Page
- Adding category ID or slug to WP Nav Menu
- Add child pages automatically to nav menu
- Removing link ” from ” menu for some “links” without JS
- Attaching a navigation menu to the admin bar?
- How can I disable parent menu item links?
- Bar separated navigation by extending Walker_Page
- Get parent page/menu id of current post
- Edit Custom Links Menu markup: Making a Social Media Menu with linkable icons
- Customizing a walker menu class
- How to add ID and class in nav menu walker?
- Add “parent” class to parent menu items
- Add class to active element and its parent in nav menu
- Handling complex multi-level architecture / menu for large site
- Add custom text to menu
- Menu styling for last menu item
- Must a page be published in order to be added to menu?
- Hiding Admin Page While Keeping Menu Expanded
- How to make a custom menu based on a category or tag?
- Third level navigation class
- Best way to customise wp_nav_menu [duplicate]
- Prev / Next menu item
- add span class and i tag inside wp_nav_menu link anchor tag
- Hide sub menus sometimes
- is_page() not working with archives?
- How to Overwrite/Customize wp-admin/nav-menus.php in WordPress
- Filter for Admin Nav Menus Drop Down
- Add a class at specific element in custom Menu Walker
- How to approach this menu design?
- Trying to Create Menu in WordPress
- Making nav menu sticky and transparent
- Jupiter theme Mega menu option not available
- Sub Menu does not display using Nav Walker
- Get Menu Name inside walker
- How to add ul and li classes to nav in wordpress
- Cant add menu items with my theme
- Why aren’t my post showing under my custom menu?
- Responsive menu gone on wordpress Responsive theme
- Dynamically add sub menu items
- How can I add text to a single nav menu item?
- Alternative to wp_get_nav_menu_items?
- How to add attribute in menu code
- In the Admin Dashboard, can I choose which sections to display?
- remove class “sub-menu” from wordpress drop down menu
- Walker menu not displaying at all
- Twenty seventeen Menu is not responsive not clickble
- remove menu items if user can’t read
- How to set classname for tag in wordpress menu?
- add 3rd party link (with script) to menu item
- rearrange the posts by published date in Menu posts selection
- Setting color of specific menu items depending on page or post tag
- Limit wp_nav_menu_objects() only to first-level menu items
- wp_get_archives doesn’t take effect from css or html
- Hide an item from a menu to some users
- Locking in navigation labels before changing title?
- Change Menu Button Text [closed]
- How to Add support for sub-menu item description in wordpress?
- wp_nav_menu_items for one menu
- I can’t add more pages to menu – menu delete pages
- Confused about the correct functioning on WordPress Menus
- Admin Menu Hack (Left side in Dashboard)
- How to open a lightbox form from a navigation menu item
- How to manipulate attributes of url-less dropdown item in a the custom wordpress menu?
- How do I remove this menu bar?
- Hide custom menu when when no menu selected
- nav-menu-template and columns in sub menu
- Auto delete menu items with zero products (woocommerce)
- menu not showing on mobile view
- Why is my navigation in my onepage not working?
- Admin menu in different languages
- Navigation item – current date in url
- Edited one page in my working menu and now all menu buttons don’t open unless I right-click and open in new tab
- Need help with Walker_Nav_Menu class
- Impossible to remove page from menu
- why are my walker menu is showing like this?
- choose selected for select option with condition [closed]
- Menu doesn’t open on mobile
- wp_update_nav_menu also triggers post_updated
- Unable to filter/group the menu items based on the category of the pages in the Menu using wp_nav_menu
- Classes CSS (Optional) – how do I reference this in php?
- Replacing nav-menus.php file with standard clean one?
- How to add limited items in WordPress menu?
- Problem with positioning of the menu in custom WP style
- Site-wide tabs at WordPress website?
- How to make menu output links absolute
- Creating custom Menu for custom theme
- Importable Menus? Along with Pages (a site layout template)
- Update nav menu not selecting parent
- List of WordPress menu item indices?
- Display all submenus
- WP Nav Menu: String replacements
- who to limit number of li in wp_nav_menu
- Add a navigation menu item using MySQL
- how to make a walker to this (in bootstrap, i try but not work)
- Any plugin to make a 3 levels menu? [closed]
- Why don’t my custom menus show up in WPtouch Pro?
- How to change first letter of active menu item
- Site navigation sits unstyled for a second on page reload [closed]
- Control page access based on User Meta data?