A unique design feature in ENVY is that the site header is positioned below the slider. However, some developers may prefer the header to appear above the slider. This change is very easy.
In your ENVY (v1.2+) theme’s /lib/js/main.js file, simply replace all code for the function envyFunc() with the following:
function envyFunc() {
var scrollYpos = $( document ).scrollTop();
// Set displacements in flow
$( ".site-container" ).css( 'padding-top', topnavHeight + headerHeight );
$( ".site-header" ).css( 'top', topnavHeight );
// Make header narrow on scroll
if ( windowWidth > 960 && scrollYpos > sliderHeight ) {
$( ".site-header .wrap" ).addClass( 'narrow' );
} else {
$( ".site-header .wrap" ).removeClass( 'narrow' );
}
}
If using WP Clips, be sure to record the change in your custom Clip’s log.txt file.
And that’s it!
Jon, I changed out the copy but it’s still placing my slider on top of the Header. I’m trying to get my page to look closer to the envy pro full page slider.
here’s my page. http://www.allwoodcompany.com
Doug
Hi Doug
Your issue is further complicated by the fact that you’re on an earlier version of ENVY. The instructions above are for 1.2+ (a major update on 1.1+ which makes for a simpler change).
As mentioned in the forums, customising the original Envy front page to look like the Envy Pro full-page slider is a fairly intensive process and not recommended if you don’t have sound programming knowledge in jQuery, PHP and CSS.
Doug, please contact me if you’d like me to quote on the customisation.
Best always
Jon
Jon, how do I get the updated envy? I purchased both Envy and the Envy Pro (recently)
D
Hi, I have Envy 1.2.2. After replacing this section of code the header still does not appear above the slider. Are there any other changes I need to make?
Hi Danielle
This solution is tried and tested. Perhaps, try clearing your cache (most likely problem if using a caching plugin). Alternatively, it may be a customisation or plugin conflict. I’d really need to inspect your code to diagnose the issue.
Best always
Jon