Archived topic
Sticky header and menu
15 replies · Started by Ted van Vliet on December 10, 2014
Hi Tom,
Thanks for the theme. Bought all the addons and it works great!
Q: is there a pliggin available to make both the header and the navigation sticky? So the page content scrolls and the header end vavigation stay fixed at the top of the page?
Thanks! Ted
Hi Ted,
Thanks!
This post should help: http://generatepress.com/forums/topic/how-can-i-create-a-fixed-header-and-top-menu-in-the-generate-press-theme/#post-31579
Let me know if you have any questions :)
Hi Tom,
Thanks! I made the menu fixed now. Is there a possibility to make both the header and the menu fixed?
Ted
The instructions in the post I linked to will make the entire header sticky, as long as you use GP Hooks to include the new HTML container for both the header and navigation.
Let me know :)
I can only get the menu sticky with that code....
Can you link me to your site? :)
It looks like the slider you're using for your header has been added to the wp_head hook, which will add it into the <head></head> section of the site, which isn't correct.
Try adding that slider into the "Before Header Content" hook instead.
Let me know :)
Thanks Tom!
That does the job!
Awesome! :)
I have a header added through gp hooks and the div container set up as recommended above and it is still not giving me the result I need which is to keep my header on top of my sticky nav. please help!
http://trucksplusomaha.com
It looks like you didn't add the CSS provided: https://generatepress.com/forums/topic/how-can-i-create-a-fixed-header-and-top-menu-in-the-generate-press-theme/#post-31579
You'll also want to turn off your sticky navigation.
thanks Tom! I had the css in and took it back out but still had the sticky nav setting turned on. Any idea why I'm getting a horizontal scroll when the sticky header is applied?
Does the horizontal scroll disappear when you remove the sticky header CSS?
the nav is giving it about a 10px scroll and is there whether or not the sticky nav is there