-
AuthorPosts
-
October 1, 2014 at 9:22 am #327906
Is there a way to use the shrinking header on the homepage only?
LOVE THE UPDATE! Thanks
October 1, 2014 at 1:24 pm #328030Hey AMseptemeber!
Please try adding following code to Functions.php file in Appearance > Editor
function add_custom_shrinking(){ if (!is_home()){ ?> <script> jQuery(window).load(function(){ jQuery('html').removeClass('html_header_shrinking'); }); </script> <?php }} add_action('wp_footer', 'add_custom_shrinking');
Cheers!
YigitOctober 6, 2014 at 6:24 am #330709Not working. Does this require me to turn off the shrinking header and let it be enabled through this function?
October 6, 2014 at 6:27 am #330710Parse error: syntax error, unexpected $end in **/wp-content/themes/enfold-child/functions.php on line 29
October 6, 2014 at 6:29 pm #331063October 6, 2014 at 8:00 pm #331124It’s back up now. What do I need to do to make this work?
October 7, 2014 at 6:27 pm #331822Hey!
Unfortunately it is not simply possible to achieve what you want. Please hire a freelance developer on Envato Studio or Codeable.
Cheers!
YigitOctober 7, 2014 at 7:04 pm #331840Then what ws the code you originally offered supposed to do? Thats kind of confusing.
October 7, 2014 at 7:13 pm #331850Is there someone else with Kriesi who can take a look at this?
October 8, 2014 at 8:27 am #332191Hey!
Please try this:
function add_custom_shrinking(){ ?> <script> jQuery(window).load(function(){ var header = jQuery('.html_header_top.html_header_sticky #header'), shrinking = header.is('.av_header_shrinking'), bodyclass = jQuery('body'), homepage = bodyclass.is('.home') if(shrinking && !homepage) { jQuery('html').removeClass('html_header_sticky'); } }); </script> <?php } add_action('wp_footer', 'add_custom_shrinking', 10);
Remove browser cache then reload the page a few times.
Best regards,
IsmaelOctober 9, 2014 at 8:49 pm #333445Thanks Ismaal. I tried this in the functions.php but didnt get the needed results. Instead, the header loads in large size and then shrinks when scrolling and then scrolls up off screen. I am trying to get the header to load in the shrunken size on posts
October 11, 2014 at 7:44 pm #334370Hey!
While leaving the modification proposed by Ismael as is, add the following code to Quick CSS or custom.css:
.home #header_main .container, .main_menu ul:first-child > li a { height: 88px !important; line-height: 88px !important; }
Best regards,
Arvish -
AuthorPosts
- You must be logged in to reply to this topic.