Archived topic
Split the primary navigation
7 replies · Started by Michael on December 25, 2020
Hello,
I'm trying to split my primary navigation into two. One goes to the left, right after the logo. Then the other to the right. Similar to this https://demo.themeum.com/wordpress/skillate/
I've found some similar posts but they mostly want the logo at the center. This article could work but I need the logo to stay on the left.
Any guidance is appreciated.
thanks
Hi there,
Try adding the items on the left as the primary navigation items, then items on the right using the generate_menu_bar_items hook:
https://docs.generatepress.com/article/generate_menu_bar_items/
Let me know if this helps :)
Hi Leo,
Thanks for the response. I actually tried using that hook as well but it didn't seem to work for me + it shows up separately on mobile view. I can give it another try but I also started exploring the solution on this post: https://generatepress.com/forums/topic/split-menus-into-two-separate-lists/
I had my main menu float right then used generate_after_logo to add another menu on the left (right after the logo). My issue, however, is that the drop-down menu doesn't work and they show up as bullet list. Is there a workaround for this?
My way is likely the best solution.
You can add a class like hide-on-mobile if you want the hook element to not displayed on mobile:
https://docs.generatepress.com/article/responsive-display/#using-our-hide-on-classes
Can you add the content in first and we will figure out for the mobile later?
One step at a time :)
Thanks!
ok one at a time 😁
Quick question with this solution. Should I Use Navigation as Header? or doesn't matter?
Will you be using the sticky navigation as in the example site?
If so yes let's go with the navigation as header option first :)
Well, that solves part of my problem. My primary menu now shows up on the left and item added via generate_menu_bar_items on the right. Thanks!
Now my problem is that the menu I want to show up via the generate_menu_bar_items hook shows the users avatar. I'm showing it using another plugin (Ultimate members). Please see screenshot below
Is there a way I can just use an existing menu?
Hi there,
what are you expecting to be displayed in place of the users avatar ?