-
AuthorPosts
-
May 11, 2020 at 2:04 pm #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.
May 12, 2020 at 5:39 am #1212013Hey tekniskakari,
Please provide a link to the site/page in question so we can look into this issue further.
Best regards,
Jordan ShannonMay 12, 2020 at 8:37 am #1212043Sending in private, because maintenance mode is active
May 13, 2020 at 9:35 am #1212543Since 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.
May 13, 2020 at 9:49 am #1212548what 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.May 13, 2020 at 12:23 pm #1212583Thanks a lot :)
May 13, 2020 at 12:41 pm #1212591Was 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 ) -
AuthorPosts
- You must be logged in to reply to this topic.