Archived topic
Different Primary Nav per page category
4 replies · Started by David R on October 18, 2019
I'm using a plugin to add categories to pages. Is there a way to have different Primary Nav menus based on the selected page category?
The alternative is using perhaps something like the Secondary Menu hook I found here.
However, the style (color, text-shadow, etc) for each navigation is different. I'm using the page categories to change typography/font-face too.
So question is: what's the best method to have different navigation based on page category?
I think I found it with wp_nav_menu() in the after_header hook with Display Rules set to the category. I had an incomplete function in my testing.
But if there's any better method, let me know.
Hi there,
I would recommend trying one of these plugins:
https://wordpress.org/plugins/if-menu/
https://wordpress.org/plugins/conditional-menus/
Let me know if this helps :)
Conditional Menus was exactly what I needed. Thanks!
No problem :)