Community Forums › Forums › Archived Forums › General Discussion › secondary nav after_header in Infinity
Tagged: infinity, secondary menu after_header
- This topic has 8 replies, 3 voices, and was last updated 6 years, 10 months ago by wtechrbr.
-
AuthorPosts
-
October 11, 2017 at 1:07 am #212404betsieParticipant
Hi, I brought back the secondary menu to it's standard position (after_header).
But I think I'm missing something: the secondary menu jumps to the top of the page and is hiding behind the header. Do I need a conditional tag or css to make it work?
The site is locally developed so I cant provide the url.
Thanks for pointing me in the right direction.
Betsy
October 11, 2017 at 1:00 pm #212425Victor FontModeratorThe Infinity header has it's position set in CSS to fixed. If you want the menu in the after header position, you have a couple of choices. You can either removed the header's fixed position, or, give the after header area a fixed position also. If choose the latter, you have to adjust the after header area's top margin as well as the main container following. You may also have to play around with the jQuery that changes the header size. It will be tricky.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?October 11, 2017 at 2:13 pm #212433betsieParticipantDear Victor, thank you for looking at my issue. I never would have found the fixed position caused this! I am trying out some options now, the secondary nav with a fixed position doesn't look nice, a top-margin seemed to work. I will try this in different screen sizes.
Thanks a thousand times!
Betsy
January 31, 2018 at 12:58 pm #215920wtechrbrMemberHey Betsie (and Victor),
I am interested in doing the same, but my attempts to move the secondary nav back up to the top have failed. There's quite a bit of add_action, remove_action, renaming in the functions.php file that I haven't come up yet with the right change. Do you recall specifically what changes you made to achieve that?
Thanks!
January 31, 2018 at 1:54 pm #215923betsieParticipantHi W., I didn't document the changes very well, I just checked and saw that I removed the lines that repositioned the menu's and the lines that renamed the secondary menu.
There was a lot of CSS tweaking involved to get it right, most helpful where Victor's suggestions. I solved my problem by adding a top margin.Good luck!
January 31, 2018 at 2:01 pm #215924wtechrbrMemberThanks Betsie - appreciate the tips and will hopefully meet the same success you did.
January 31, 2018 at 2:37 pm #215927wtechrbrMemberSuccess has not yet been achieved...
I commented out the line that renamed both and added in the line that only renamed the primary, and commented out the repositioning of the secondary nav. The result was the secondary nav just disappeared. I know there are CSS changes still required, but I would think I'd see the secondary nav (although likely with issues) somewhere near the top.
Betsy I know you likely don't have time to problem solve this with me, but I appreciate your insight and will keep making further attempts. Victor, maybe the error is obvious, and I'm just overlooking something else that's needed. Below is the new functions.php code I tried.
----------------------------------------------------------
// Rename primary and secondary navigation menus. COMMENTED OUT THE LINE BELOW AND ADDED THE NEXT
// add_theme_support( 'genesis-menus', array( 'primary' => __( 'Header Menu', 'infinity-pro' ), 'secondary' => __( 'Footer Menu', 'infinity-pro' ) ) );add_theme_support( 'genesis-menus', array( 'primary' => __( 'Header Menu', 'infinity-pro' ) ) );
// Reposition primary navigation menu. LEFT THIS IN PLACE
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_header', 'genesis_do_nav', 12 );// Reposition the secondary navigation menu. COMMENTED OUT THE SUBSEQUENT LINES
// remove_action( 'genesis_after_header', 'genesis_do_subnav' );
// add_action( 'genesis_footer', 'genesis_do_subnav', 5 );January 31, 2018 at 4:19 pm #215933betsieParticipantMaybe you have to add a wrap for the menu. It is possible that the sec. menu already is there but hides behind the header (as it did in my case), you should see it in firefox then.
I added more things to the theme, so I have to dive into it and try again. As I am quite busy the next weeks, I'm not sure if I can help shortly.
Do you use Infinity? It has a functions file for the frontpage, so also check this.
Another option is to use the Enterprise theme, it has the secondary menu already in place.January 31, 2018 at 6:57 pm #215936wtechrbrMemberBetsy, checked on the things you mentioned, but don't see the secondary nav buried in there. I know you're not a moderator so I extremely appreciate the thoughts and suggestions you've graciously shared with me. Will open a new topic since what I'm trying to achieve you solved before this one was opened. Cheers!
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.