• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Riot Customs

Genesis WordPress Development, Maintenance & Support

  • About
  • Services
  • Blog
  • Shop
  • Contact

Sticky Menu Navigation in Genesis

Written by Riot Customs

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 functions.php file.
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!

Previous Post
Next Post

GenesisWP 6 Comments

Reader Interactions

Comments

  1. Siam Naulak says

    March 13, 2017 at 8:45 am

    Hi, thank you so much for this tutorial. This sticky menu is not working for mobile view. How do I make it work for mobile and tablet?

    Reply
    • Katrina says

      March 13, 2017 at 10:59 am

      You need to make sure that your navigation is coded properly for both desktop and mobile. This is only adding a js to make it “stick”.

      Reply
      • Siam Naulak says

        March 17, 2017 at 10:24 am

        Hi Katrina, I am using Genesis framework. So, is there any modification I need to make?

        Reply
        • Katrina says

          March 17, 2017 at 8:59 pm

          You need to create a new folder named js then create a file called sticky-nav.js copy & paste code as instructed. Add the following snippets for the function.php file and the css.

          Reply
  2. Masud Pilot says

    May 12, 2017 at 3:36 am

    Thank you for this tutorial.
    Can you write any tutorial about adding a logo in right side of primary navigation ?

    Reply
    • Katrina says

      May 12, 2017 at 10:29 am

      I’ll look into that writing that, thanks for the suggestion.

      Reply

Share Your Thoughts
Cancel reply

Your email address will not be published. Required fields are marked *

I accept the Privacy Policy

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Categories

  • Blogging
  • Business
  • Client Work
  • ConvertKit
  • Freebie
  • GenesisWP
  • Interact
  • Personal
  • Theme Releases
  • Theme Updates
  • Tools & Software
  • Tutorials
  • Web Design
  • WordPress

Master ConvertKit

A kick ass tech course on using the ConvertKit software. Want to start growing your list with the best email marketing software out there? What are you waiting for? Grab this course now!

Enroll Now!
Buy me a coffee
Newsletter

Tails from the Beast

Join our newsletter for tips on how to use the WordPress platforms. Advance your skills, and most importantly, puppy photos.

Please enter your name.
Please enter a valid email address.
Sign Me Up!

Thanks for subscribing! Please check your email for further instructions.

Something went wrong. Please check your entries and try again.

Development Information

  • How it Works
  • Trusted Partners
  • Portfolio
  • Client Portal

Explore

  • Resources
  • ConvertKit Services
  • Terms of Service
  • Privacy Policy
  • Disclamier

© 2009 - 2026 Riot Customs, LLC.

Powered by Flywheel & Beaver Builder.