-
Anonymous
Hi,
I’m trying to add a secondary navigation menu to the top of a website (before the header) using the instructions in this post https://generatepress.com/forums/topic/i-want-to-have-a-second-menu-on-certain-pages-what-is-the-best-way/, and I’m not able to make it work. I have added it as a Hook Element using thegenerate_before_header
with a priority of 15. Under Display Rules, I have chosen Entire Site.Again, I’m using this code as suggested in the post:
<div class="second-nav"> <?php if ( function_exists( 'generate_secondary_navigation_position' ) ) { generate_secondary_navigation_position(); } ?> </div>
As you can see, the menu appears twice. Can you tell me what I’m doing wrong? Also, is there a way to align that secondary menu to the left before the header?
-
Hi there,
Are you trying to add the secondary nav to the entire site or specific pages?
Let me know 🙂
-
Anonymous
Hi, Ying!
Ultimately, I’d like to add it throughout the website so I chose Entire Site. I had asked a question a few weeks ago (https://generate.support/topic/is-there-a-way-to-achieve-this-look-with-gp-gb/) about a top bar effect that was similar to a tabbed look, but I think it would be easier to achieve with this menu.
Thanks for your help! -
Ultimately, I’d like to add it throughout the website so I chose Entire Site.
If this is the case, you do not need to add the code, just set the secondary navigation location to above header at customizer > layout > secondary navigation, which it seems you have done.
So remove the hook element should fix the issue.
-
Anonymous
This is perfect so far. Thanks so much. Now, is there a way for me to get this menu left aligned?
Thanks! -
Can I see your site?
-
Can you please let me know where I can find the secondary navigation option? I don’t see it on my theme. Im using your child theme and there’s no option visible for a secondary menu.
Thank you. -
Please make sure the Secondary Nav add-on is activated: https://docs.generatepress.com/article/installing-gp-premium/#activate-your-modules
If that doesn’t help then please open a new support topic for your question.
Thanks!
- The topic ‘Secondary Navigation Menu Before Header’ is closed to new replies.