Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #975428

    My sticky header makes my logo too small when you scroll down. How can I change the size of the logo when you scroll down?

    #975450

    Hey kmolumby,

    I’m not seeing a change in the logo size at all or transition from normal to “Sticky” did you change anything?

    Best regards,
    Jordan Shannon

    #975455

    Ooops, sorry, I turned off the shrinking to see what it looked like. I turned it back on. As you can see the logo gets very small when scrolling down. I’d like it to still shrink a bit, just not that much. See http://www.cincoland.com/ for an example.

    #975477

    shrinking amount is outsourced in an own js file: avia-snippet-sticky-header.js

    so you can have that file on child-theme. Create a folder js under enfold-child.
    put in a copy of that js file: avia-snippet-sticky-header.js

    Put in your child-theme functions.php:

    add_action( 'wp_enqueue_scripts', 'wp_change_sticky_header_script', 100 );
    function wp_change_sticky_header_script() {
       wp_deregister_script( 'avia-sticky-header' );
       wp_enqueue_script( 'avia-sticky-header-child', get_stylesheet_directory_uri().'/js/avia-snippet-sticky-header.js', array('avia-default'), $vn, true);
    }

    open that copy in your child-theme and edit the lines 64 and 76:
    (click to enlarge)

    you see that on standard shrink behavior both values are 2 (that is a special case because scroll-distance is the same value as endpoint header height / if you start at 200px you must scroll 100px to reach the 100px end height)

    shrink only 33% – the first divisor is 3 ( line 64 )and the second one ( line 76 ) is 1.5

    shrink only 25% – the first divisor is 4 ( line 64 )and the second one ( line 76 ) is 1.33

    #977702

    When I create a Child Theme to do this it doesn’t pull all the changes I’ve made including font changes and colors. None of this was done on custom css. Would it be because I originally imported demo content on the parent theme?

    #977784

    Hi kmolumby,

    Did you export the theme settings from the parent and then import them to the child? After you have done so you might have to change a theme setting and save again for the settings to take affect.

    Best regards,
    Rikard

    #978029

    I just tried this and it didn’t work. Could you please walk me through the process on how to create a Child Theme? Maybe I’m doing it incorrectly. I followed the directions from https://codex.wordpress.org/Child_Themes.

    #979118

    Hi,

    You can try download the child theme from here

    And try to get things work out.

    Best regards,
    Basilis

    #1012897

    Thank you so much Guenni007. Your tip was extremely helpful.

    Best wishes,

    promosapien

    #1012903

    Hey promosapien,

    I’m glad you were able to find the help you needed. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

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