Skip to content

How to make Hestia navbar transparent for other pages ​

The Hestia theme provides a transparent navbar option, but it works only on the homepage. This article shows you how to create a transparent header on other pages as well. Hestia Free supports this with custom code, whereas Hestia Pro has a dedicated toggle.

Hestia Free ​

On a regular page, the navbar appears with a solid color, as you can see in the screenshot below.

Navbar with a solid color on a regular page

To show the transparent navbar on other pages, you can use a custom jQuery function.

To add this function, use the Orbit Fox plugin. It enables a Header Footer Scripts module in the Customizer that lets you add custom scripts to the header and footer of your website.

📝 Note: For more details about Orbit Fox, check the Header Footer Scripts module guide.

Navigate to Appearance > Customize > Header / Footer scripts and add this code:

html
<script>
jQuery( document ).ready(function() {
 transparentHeader ();
});

jQuery(window).on('scroll', function() {
 transparentHeader ();
});

function transparentHeader () {
     if (jQuery(window).scrollTop() === 0) {
        jQuery('body:not(.home) .navbar-default').removeClass('navbar-not-transparent').addClass('navbar-transparent');
    } else {
        jQuery('body:not(.home) .navbar-default').removeClass('navbar-transparent').addClass('navbar-not-transparent');
    }
}
</script>

Transparent navbar code added in the Header / Footer scripts panel

📝 Note: The checkbox in the Customizer that enables or disables the transparent header still affects only the homepage. If you decide to stop using a transparent header on all pages, remove this script.

Hestia Pro ​

Hestia Pro lets you enable the transparent header on other pages or posts using a dedicated toggle.

  1. Open the post or page you want in the editor.

  2. Open the Post (or Page) panel from the right sidebar.

  3. Expand the Post Settings (or Page Settings) accordion and check the Enable transparent header option.

    Enable transparent header option in the Page Settings panel

Was this helpful?