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
- Remove WordPress Menu Classes and ID with Bootstrap Walker
- How to add toggle-able DOM element after nav menu item?
- Display a portion/ branch of the menu tree using wp_nav_menu()
- Programmatically add a Navigation menu and menu items
- Dynamically exclude menu items from wp_nav_menu
- Split up wp_nav_menu with custom walker
- Is there an easy way to replace a custom menu link with a page or post?
- How to Add to Each Menu Link with link text to data-attr?
- Add Javascript to WordPress Menu
- Add custom menu item using wp_nav_menu_items filter
- Filter wp_nav_menu()
- How to modify navigation menu of the “My Account” page in WooCommerce
- Custom ID for certain menu item?
- how to create a menu with all sub categories?
- Add data-icon input to WordPress custom menu links
- Add separator to admin submenu
- Display only page specific sub menu items using Custom Walker
- adding some custom html code to the wp_nav_menu function
- Show just one level of child pages, wp_list_pages woe
- Removing link ” from ” menu for some “links” without JS
- Show current navigation path from menu
- Call custom field into menu item
- Use navigation path from menu for permalink
- Exclude Private, Draft pages from Primary Nav when using custom menu
- add span class inside wp_nav_menu link anchor tag
- Add a .last class to the last in each ul.sub-menu
- wp_nav_menu always falls back to a menu
- wp_get_nav_menu_items how to exclude sub level menu items?
- Add class to top level menu item if it has multiple child levels
- How to set limit only on top levels of wp_nav_menu?
- Determine if a navigation item has children
- How show sub menu only using wp_nav_menu()
- Bootstrap dropdown nav pills not working with wp_nav_menu()
- How to move parent li to end of child ul
- How do I add the data-toggle=”modal” data-target=”#myModal” attribures to a WP Nav bar?
- How to get a different mobile menu than desktop menu in the twentytwelve child theme
- Add custom attributes to menu items without plugin
- Simple Navigation Walker – Wrapper-class around first sub-menu
- Bootstrap drop down menu with wp_nav_menu
- How to get a separate child menu?
- wordpress nav menu using twitter bootstrap
- Exclude one item from wp_list_pages( $args );
- Add Page ID class to nav menu items
- wp_nav_menu() loses ‘current-menu-*’ classes on single product page within category
- How to highlight the right item in the navbar
- How to drag multiple menu items at once in WordPress?
- Customizing the a tag with Semantic UI
- How to manually add an item to a submenu in a menu generated by wp_nav_menu?
- WordPress Export Import Site Navigation Menu
- Using Image Links in WordPress Navigation Menus Instead Of Text Links
- Links open only on new tab or window
- Put a wp_nav_menu inside another one
- Not able to get current menu ID
- How to make pages metabox display all hierarchy in menu admin?
- Bar separated navigation by extending Walker_Nav_Menu
- Add items to a menu dynamically