Community Forums › Forums › Archived Forums › Design Tips and Tricks › Double Primary navs in Modern Portfolio Pro child theme
- This topic has 6 replies, 3 voices, and was last updated 10 years, 4 months ago by
asbilly92.
-
AuthorPosts
-
June 17, 2016 at 2:02 pm #187761
asbilly92
ParticipantHave 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 Navs
http://not live site yetJune 18, 2016 at 7:26 am #187789Christoph
MemberHi,
if two primary navigations are showing, your remove_action is not targeting the right hook.
Try
remove_action( 'genesis_after_header', 'genesis_do_nav' );instead.
June 20, 2016 at 5:34 am #187856asbilly92
ParticipantOK 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...
June 20, 2016 at 5:52 am #187858Genesis Developer
MemberCan you share the code of functions.php file via pastebin.com. We shall check the code once.
June 20, 2016 at 6:06 am #187859asbilly92
ParticipantSure! I will work on that now and post back when it's uploaded 😉
Thanks!!
June 20, 2016 at 6:20 am #187860asbilly92
ParticipantHere it is: functions.php file for double nav issue
June 21, 2016 at 10:17 am #187954asbilly92
ParticipantOk 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!
-
AuthorPosts
- The topic ‘Double Primary navs in Modern Portfolio Pro child theme’ is closed to new replies.