Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #573643

    The search function did result some pages – but these solutions are not working.

    #574466

    Hey Guenter!

    Shrink is disabled on mobile, you can enable by editing line 1567 of avia.js:

    if(shrinking && !isMobile)
    

    Replace it by:

    if(shrinking)
    

    Regards,
    Josue

    • This reply was modified 8 years, 10 months ago by Josue.
    #574634

    is it possible to make this changing without the loss at next update?

    Thanks!

    #574636

    Hey!

    Please add following code to Functions.php file of your child theme

    function wp_change_aviajs() {
       wp_dequeue_script( 'avia-default' );
       wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true );
    }
    add_action( 'wp_print_scripts', 'wp_change_aviajs', 100 );

    and move modified file inside /js folder

    Best regards,
    Yigit

    #575317

    Great – this is the solution till avia.js stays the same.
    If on an update avia.js gets an update i have to repeat the manual update on avia.js in child-theme folder with the new one.

    But on your opinion – this is very unlikely to occur

    btw. is it wrong to set it to “true”

    or do i only have to set: //if(isMobile) shrink = false;

    • This reply was modified 8 years, 10 months ago by Guenni007.
    #575345

    Hi!

    First of all, the line i posted was wrong, that’s not part of the header shrinking function specifically but the smothscroll one, also there’s a way to replace certain avia.js functions without having to re-create the whole file, for example you can use this code in your functions.php, to will include a new, custom JS file (js/main.js):

    function incluide_custom_js_file() {
       wp_enqueue_script( 'avia-main-child', get_stylesheet_directory_uri().'/js/main.js', array('jquery', 'avia-default'), 2, true );
    }
    add_action( 'wp_enqueue_scripts', 'incluide_custom_js_file', 100 );
    

    In this main.js file, you’d put the following (read comments):
    https://gist.github.com/josueochoa/66beec77cfa7a21e81b8

    That way you’re technically replacing avia_header_size using a child theme.

    Best regards,
    Josue

    #576371

    thanks Josue for your immense work – and it works great. (Thanks Yigit too)
    So now i have not to think on it at next update. :yoo

    • This reply was modified 8 years, 10 months ago by Guenni007.
    #576704

    You are welcome, glad to help :)

    Regards,
    Josue

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