- This topic has 6 replies, 3 voices, and was last updated 9 months, 3 weeks ago by Tom.
May 16, 2020 at 5:32 am #1287050jhmattern
On a private dev site I’m adding a menu to the top bar (not using the secondary navigation because I’m already using both navigation bars in other places). I can add a basic menu fine using the top bar widget area.
I have a custom function to add login/logout links and a “my account” link for logged-in users to the end of the menu I need in the top bar. And this doesn’t work if the menu is pulled in via a widget area. It needs a menu theme location.
I already did this successfully in my footer menu by registering a new menu and using GP hooks to add that menu before the copyright notice. But I can’t seem to do the same in the top bar because there doesn’t seem to be a way to hook into it.
Is there a hook option I’m missing that will let me insert a newly registered menu inside the top bar?
I saw another support thread where it was suggested the “before_header” hook would work, but it doesn’t. When I do that, it inserts my new menu (including the login/logout links) under the top bar and before the header rather than within the top bar.
Is there any way to hook inside that top bar directly?
Thanks!May 16, 2020 at 9:15 am #1287462DavidStaffCustomer SupportMay 16, 2020 at 9:37 am #1287489jhmattern
Would that lose the ability to use other widgets there though? I currently have a widget for social media icons floating left and need the menu floating right.May 16, 2020 at 12:05 pm #1287670jhmattern
Nevermind on this for now. I think it might make more sense to just merge the secondary nav back into the top bar and try to use a hook to create the lower bar beneath my primary nav. So I’m going to mark this resolved for now and will revisit if I can’t get that alternative to work.May 16, 2020 at 3:00 pm #1287822TomLead DeveloperLead DeveloperMay 18, 2020 at 10:22 am #1290549jhmattern
No need. The other option worked out great. Thanks!May 18, 2020 at 12:07 pm #1290678
- You must be logged in to reply to this topic.