How to show / hide sticky menu on scroll in Hestia

By default, the navigation bar is transparent if you are on top of the page, and it turns white if you scroll down. Also, the navigation bar remains visible during the whole process. 

In this guide, you will learn how to hide the navigation bar when scrolling down and show it again once you scroll up.


First, you need to install the Orbit Fox plugin (Hestia recommended).


Then, navigate to Appearance > Customize.


Open the Header/Footer scripts.


Copy the code below and paste it inside Header scripts.

<script type = "text/javascript" >
   window.addEventListener('DOMContentLoaded', (event) => {
       var lastScrollTop = 0;
       jQuery(window).scroll(function() {
           var st = jQuery(window).scrollTop();
           if (st > lastScrollTop) {
           } else {
           lastScrollTop = st;

Once this is added, press  Publish.


Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us