- This topic has 6 replies, 3 voices, and was last updated 6 years, 7 months ago by .
- The topic ‘Double Primary navs in Modern Portfolio Pro child theme’ is closed to new replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
Have an odd thing for some reason right from the get-go my primary-nav was outside of the header. in this new site (is NOT UP yet live 😉 ). I need it to be inside the header and be the last item in the header. I added the following code into my .functions.php file and like magic I got 2 primary navigations lol! Ummm nice but not what I want. I want to KEEP the primary-nav that is inside the header and get rid of the one that's just outside of the header area. Any help is appreciated, maybe I'm missing something kinda easy that I'm overlooking?? Not sure bur grew frustrated with it!!
/*Reposition the primary navigation menu */ remove_action( 'genesis_before_header', 'genesis_do_nav' ); add_action( 'genesis_header', 'genesis_do_nav', 12 );
For now on the one that ended up outside the header I added css of display:none, - that affected the first nav too so on that one I added: display:initial so it would still show!
The site isn't live yet but here is a screenshot of the 2 navs in Developer Tools ...Showing both Primary Navshttp://not live site yet
OK great thank you, I had tried that before and it showed the same thing, two primary - navs; but to make sure I just tried it again. Same result, still have 2 navs showing...
I wonder if maybe this has something to do with the dashboard settings as far as the primary nav menu? I can't remember now how the nav bar was set up right out of the box... but I'm almost positive there was no 'extra' code in the functions file targeting the primary nav...
Can you share the code of functions.php file via pastebin.com. We shall check the code once.
Sure! I will work on that now and post back when it's uploaded 😉
Ok geeze, I figured it out! I realized that it was only showing up on the home page, never even thought of that!
I removed the following from the .front-page.php file:
//*Make the primary nav show on home page also add_action( 'genesis_after_header', 'genesis_do_nav', 9 );
Kinda silly, but I never noticed that problem was only on the home page... hope this helps someone else... the joys of wordpress lol!
© 2023 WPEngine, Inc.