Tagged: , ,

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #327906
    #328030

    Hey 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!
    Yigit

    #330709

    Not working. Does this require me to turn off the shrinking header and let it be enabled through this function?

    #330710

    Parse error: syntax error, unexpected $end in **/wp-content/themes/enfold-child/functions.php on line 29

    #331063

    Hi!

    Please remove the code from Functions.php file via FTP.

    Cheers!
    Yigit

    #331124

    It’s back up now. What do I need to do to make this work?

    #331822

    Hey!

    Unfortunately it is not simply possible to achieve what you want. Please hire a freelance developer on Envato Studio or Codeable.

    Cheers!
    Yigit

    #331840

    Then what ws the code you originally offered supposed to do? Thats kind of confusing.

    #331850

    Is there someone else with Kriesi who can take a look at this?

    #332191

    Hey!

    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,
    Ismael

    #333445

    Thanks 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

    #334370

    Hey!

    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

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.