Archived topic
Different Secondary Nav menu per Page/Post/Category
11 replies · Started by Anonymous on September 19, 2015
Hi,
I'm looking at GeneratePress as on option for a website redesign. The website itself is very content heavy and I expect I'll need to use the Secondary Nav add-on to keep everything organized.
I see general options for the Secondary Nav add-on which I assume affect every page on the site. My question is, is it possible to have a different Secondary Nav menu (with associated options) depending on the page/post/category that is loaded? If yes, is the process difficult?
I'm a Wordpress newb so I'd like to keep things as simple as possible. I'd rather only work with options I can play around with rather than code.
Thanks!
Frugalmeister
Hi there,
A plugin like this might be necessary: https://wordpress.org/plugins/menu-swapper/
It allows you to switch out menus on a per-page basis.
Thanks for the suggestion Tom.
Is this plugin compatible with GeneratePress? I am trying the free version of GP without any addons. If I edit a Page, I can replace the Primary Menu only with the Primary Menu, since GP only allows 1 menu (as per the Appearance > Menus > Manage Locations page). So effectively I can't replace the Primary Menu with anything.
Frugalmeister
Also, the Menu Swapper plugin only swaps the menu located in wp_nav_menu. If I get the Secondary Nav add-on for GP, will the Menu Swapper allow me to swap the secondary menu? That's the only one I want to customize, depending on the page being visited.
Thanks!
Frugalmeister
If you have the latest version of Wordpress installed you should be able to create as many menus as you need.
https://codex.wordpress.org/WordPress_Menu_User_Guide
You can then use the plugin above to swap between menus and choose which menu should be assigned as main navigation on different posts and pages. You can also use the custom menu widget and then use the widget visibility function in jetpack to control where the custom menu is visible.
Are is 100% correct - you can create as many menus as you like and switch them out within the Primary Menu location as needed.
The same goes for the Secondary Nav add-on :)
I don't think I'm following guys.
Yes, I can create as many menus as I like, but it seems like only one of them can be assigned as the Primary Menu (in Appearance > Menus > Manage Locations). It says, "Your theme supports one menu. Select which menu you would like to use."
When I edit a page/post, I have two fields for Menu Swapper: "Replace this Theme Location" and "With this Theme Location". The "With this Theme Location" field only lists "Primary Menu" as an option. No other theme locations are listed so I have no choice. I don't have a list of menus to pick from. :/
Frugalmeister
Once Menu Swapper is activated, go to "Settings > Menu Swapper".
In there you can create as many theme locations as you like.
Then when you create your custom menu, apply it to your newly created location.
That will allow you to use that location on individual pages.
Aha! Thanks Tom. This works now and I can swap out the primary menu. If I can do the same with the secondary nav add-on, then problem solved!
Thanks!
Frugalmeister
You definitely can! :)
I see that it is possible to select a custom menu for a specific page or post, but is it possible to do it for all posts tagged with a certain tag?
Thanks in advance!
This post is a bit old.
The plugin we now suggest for this request would be:
https://en-ca.wordpress.org/plugins/if-menu/
or
https://en-ca.wordpress.org/plugins/conditional-menus/
Hopefully one of them has the option you are looking for :)