All you have to do is to change the name of the menu location.
Change the line where it says:
'theme_location' => 'primary',
to
'theme_location' => 'sidebar',
and viceverse.
That should do the trick.
However, you should keep in mind that this kind of setup can become pretty confusing.
(In case you mistake one for the other and start looking at the wrong positions etc.)
Related Posts:
- Multi Level Bootstrap Navigation Menu in WordPress
- Nav walker bootstrap: Display 3rd level and 4th level in dropdown menu
- Show only 2nd level of navigation depending on active navigation
- HTML Bootstrap navigation menu to WordPress menu using wp_nav_menu
- Custom Nav Walker sub-menu HTML construct
- Adding different classes to anchor in navigation menu
- Add Bootstrap dropdown class to a nav menu
- Nav walker, bootstrap: Display 3rd level items under 2nd level
- how to automatically generate hierarchical menus from hierarchy of pages?
- Make compatible custom menu widget for Twitter Bootstrap
- How to display dynamic content in start_lvl function
- Menus like a CMS
- How to have custom menu Item CSS Classes for wp_page_menu() or wp_list_pages()
- How to add a submenu toggle button inside all “li” elements that have a submenu?
- Main Menu and Sub Menu Items for Footer
- Check if menu id = $specific_id – then insert specific
- How to have two menus using Bootstrap nav walker?
- wp_nav_menu() with multiple Class
- Trying to Create Menu in WordPress
- How do I add recent posts to the menu?
- Automatically list top level menu item child pages
- Check if menu_item has children or has parent
- Add a submenu to wp_nav_menu
- How to buid wordpress menu with auto width sub-menu items in dropdown menu without any items sharing one line [closed]
- Adding toggle-able element after menu item
- Make two bootstrap menus collapse into one dropdown
- How to Add support for sub-menu item description in wordpress?
- Add Different Class on Different Ul in twenty-twentyone theme
- wp_nav_menu container style args
- Bootstrap Theme Migrated to WordPress
- How can I click the parent menu then redirect to a special URL?
- Navbar is hidden behind carousel when using wp-boostrap-navwalker
- Bootstrap Nav Walker Sub Menu Image
- Creating navigation out of specific IDs and their children?
- Where to place a svg chevron down in my custom walker?
- Add href to tag in nav menu for mobile
- Conditional Nav Menu Inside Nav Menu Across Multisite Sites
- Show Child of Parent Page including all other parents
- nav_menu: how to force a subpage switching on the parent menu
- How was this menu system created?
- Display sub menus as separate lists
- nav tag wrapping around dropdown
- Give custom class names to WP nav sub-menu
- wp_nav_menu parent in submenu
- How to add toggle-able DOM element after nav menu item?
- Display a portion/ branch of the menu tree using wp_nav_menu()
- Dynamically exclude menu items from wp_nav_menu
- Display only page specific sub menu items using Custom Walker
- adding some custom html code to the wp_nav_menu function
- Add Page ID class to nav menu items
- Generate a tabbed submenu — from taxonomy term or submenu item — with sample content
- Add sidebars to navigation menu?
- How to insert custom code into wp_nav_menu structure?
- Remove li from wp_nav_menu
- Adding post excerpt into navigation menu
- I am facing a problem with the navigation menu of my website
- Prepend to start of WordPress nav loop
- You do not have permission to create Navigation Menus – Twenty Twenty-Two theme
- Creating a navigation menu to see where you are on your website
- Sticky Header in WordPress using BootstrapWP theme [closed]
- Does is_child() exist in wp 3.5.1?
- How to highlight 1st level menu item based on actual page
- Add span in top menu item with nested itens
- Add Labels to Admin Menu ( How To )
- Problem adding ‘has-children’ class to wp_nav_menu
- set certain item in nav walker to active when on archive pages or singles
- wp_nav_menu() | Outputting my own custom code using built in features
- Add (grand)child pages automatically to nav menu
- The cart, checkout, and shop links not getting removed
- Creating menu always gives error A name is required for this term
- Switch an entire nav menu if user is logged in
- WordPress functions.php does not affect the theme menus
- Display Menu Navigation Label
- Menu is not displaying on the site navigation [closed]
- Wp Nav Menu div containers
- Updated WordPress, now Navigation is Messed Up
- Possible to append class to nav menu added to widget area?
- need help in wordpress navbar setup
- How can I creat custom menu with bootstrap
- Multi-Level Nav Bar
- Change markup for just 2nd list element in custom Walker menu
- Additional CSS for the nav menu
- Incorrect Behavior on WordPress Main Menu
- Importing large product categories into wordpress menu
- Add newsletter signup element to navigation bar
- Reveal hidden submenus on page load – Twenty Fifteen theme
- wp_nav_menu not selecting teh correct menu
- Add a Submenu from Another Submenu in a Custom Theme
- Highlighting Main Navigation Menu With Two or More Class Matches
- Adding two submenus to a menu
- Remove from wp_nav_menu() wordpress
- collapse twenty twelve submenu in mobile version
- Second tier sidebar navigation
- Add custom ID to wp_nav_menu list items
- Creating an accordion style menu
- How can I structure my pseudo footer nav code with wordpress codex code?
- WordPress nav Walker – Bootstrap 5.2.3 – submenu not opening
- Off-Canvas Menu Toggle Issue After WordPress Core Update
- How to get and set post meta for core/navigation-link?
- Change color of active link to navigation menu