Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1211837

    Hello.

    As title says, I’ve added some to the main menu with add_action.
    It’s following: add_action(‘ava_inside_main_menu’, ‘add_custom_logo’, 10, 0);

    The problem is that the menu is shrinking on scroll. I’ve tried some quick javascript but didn’t get it totally parallell.
    I know we can make the menu sticky, I’m just not sure if the designer or client wants that.

    Any tips on how I can make the add_custom_logo in ava_inside_main_menu to shrink on scroll too?

    • This topic was modified 4 years, 7 months ago by tekniskakari.
    #1212013

    Hey tekniskakari,

    Please provide a link to the site/page in question so we can look into this issue further.

    Best regards,
    Jordan Shannon

    #1212043

    Sending in private, because maintenance mode is active

    #1212543

    Since no reply we had to make menu sticky :) If anyone knows how to make “ava_inside_main_menu” to act with the menu though, let me know please

    • This reply was modified 4 years, 7 months ago by tekniskakari.
    #1212548

    what kind of header-settings do you have: logo left menu right or something else?
    what kind of content – an image as “second logo” ?

    so – the script responsible for shrinking behavior is: avia-snippet-sticky-header.js
    you can have a child-theme script instead of loading the parent one by:

    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);
    }
    

    This script takes care of the shrink factor and other settings – for example the varialble line-height while shrinking.
    In the function avia_header_size there is the calculation of the effect – the trick will be to include the new element to be calculated f.e. in height and width.

    #1212583

    Thanks a lot :)

    #1212591

    Was this advice enough to solve your problem or do you need support?
    In this case I would have to know more about your setting – the best thing would be to see the page it’s about.
    ( Think of : i’m participant as you are – so i do not see private content in your postings )

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