-
AuthorPosts
-
January 28, 2016 at 11:47 am #573643
The search function did result some pages – but these solutions are not working.
January 29, 2016 at 1:01 pm #574466Hey 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, 9 months ago by Josue.
January 29, 2016 at 4:28 pm #574634is it possible to make this changing without the loss at next update?
Thanks!
January 29, 2016 at 4:31 pm #574636Hey!
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,
YigitJanuary 31, 2016 at 4:14 pm #575317Great – 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, 9 months ago by Guenni007.
January 31, 2016 at 6:37 pm #575345Hi!
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/66beec77cfa7a21e81b8That way you’re technically replacing
avia_header_size
using a child theme.Best regards,
JosueFebruary 2, 2016 at 11:47 am #576371thanks 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, 9 months ago by Guenni007.
February 2, 2016 at 9:25 pm #576704You are welcome, glad to help :)
Regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.