I get ask this a lot when developing custom GenseisWP themes for clients. I think it’s a really cool feature to add on to your themes. So here’s how to add it to your GenesisWP theme.
First you’ll need to enqueue the script by add thing snippet to your
Create a new file and name it
sticky-nav.js in your js folder. If you don’t have you’ll need to create that folder. Then you will copy and paste the code below and save.
Now for some CSS, you can use this code the get the placement right but dress it up on your own.
Tip: Want to have the secondary navigation sticky instead? Then switch primary to secondary and you’re in, now go try it out!