Archived topic
Secondary navigation like on GP documentation
7 replies · Started by Gabriel on January 22, 2022
How do I setup a secondary navigation in a sidebar that shows different items depending on where I am in the primary navigation, like on your own documentation site?
Hi Gabriel,
You can use a secondary navigation: https://docs.generatepress.com/article/secondary-navigation-layout-overview/
Make sure the secondary nav module is activated in Appearance > GeneratePress.
But that would always show all items in the menu added to the secondary lation? Can I get a filtered menu like you have?
Not sure I understand your question.
If you add pages or categories to the menu, you can set current color for the menu item at customizer > colors > secondary navigation, the 3rd color is for current menu item: https://docs.generatepress.com/article/global-colors-overview/#pick-colors-for-elements
For example, if you are on the home page, and you have home page in your secondary navigation, the home page menu item will use the color you set in the customizer
It's the same for primary navigation as well.
No I am not asking about colors.
Compare these pages:
https://docs.generatepress.com/collection/general/
https://docs.generatepress.com/collection/customization/
They have different menus in the secondary navigation. What configuration is required to get that?
That's a custom solution.
A plugin like this should work be what you are looking for:
https://en-ca.wordpress.org/plugins/if-menu/
Thanks! Just wanted to make sure that I wasn't missing anything already available in GP.
No problem :)