Site logo

Archived topic

Top Menu Bar - sub menu issue

7 replies · Started by Goldstein on August 8, 2021

Viewing posts 1–8 of 8

Hi Guys,

I found a solution on your support forum on how to create top bar menu. It all works well however I'm unable to create sub-menus. I have tested sub-menus on the my main top menu and it all works as expected. However, sub-menu does not show on my top bar menu.

Can you please provide some hints?

Thank you! Worked...I did not have Generatepress Secondary menu enabled so it took me a while to find out what are you talking about..:-)

1)
How can I tweak it more? For example is there a way to set different font and font size on the secondary menu? At the moment I only know how to change colors..
2)
Also is it possible to set two different menus on the same top menu bar. For example menu one aligned to right and the second aligned to right?

thank you

Hi there,

For #1:

You can set the font size and font family for secondary nav on Appearance > Customize > Typography > Secondary Navigation. If you have more customizations for it you'll have to write custom CSS. :D

For #2:

It's possible but you'll have to hook it in depending on how you want it laid out. :D Any particular layout you have in mind?

Hi Elvin

For #1:
Easy...thank you. For those who are reading this here is a link to the official documentation on how to add custom CSS to Secondary Nav Bar.

For #2:
I was thinking about something like this:
ITEM1 ITEM2 ITEM3 ITEM4 ITEM5 |--------------Separator-----------| CONTACT NEWSLETTER

thank you

Since your top bar is the secondary menu, you can hook a Hook Element or Block element on generate_after_secondary_navigation hook.

Say for example you have 2 button contents for a Block element, you can hook it on after_secondary_navigation so it shows after the secondary menu (top bar). We then set the separator with CSS.

Let me know once you've hooked it in so I can reinspect the page. :D

Hi Elvin,

I have tried to create Hook with some random text however I do not have the after_secondary_navigation option available. What I have available is generate_inside_secondary_navigation. This places my random text to the left side of the secondary menu and pushes existing menu buttons to the right.

Apologies if I did not understand your instructions. Still new to WordPress and generatepress.

thank you

Ah yes not all hooks are included yet.

You can go through the dropdown and select "Custom Hook".

Once you've selected custom hook, a text field below it will appear.

Place generate_after_secondary_navigation on this field to use a hook not included on the dropdown. :)

This archived topic is closed to new replies.