if i have sometimes changings in avia.js
i do it via child-theme and a copy of avia.js and in functions.php:
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 );
on one installation with enfold 3.84 i got now the loading of both child-theme and parent-theme
the parent theme avia.js wasn’t dequeued
Hey Guenter,
We are going to need FTP and WP admin logins to look into it as it does work fine on my local installation :)
Best regards,
Yigit
Ok – there is on child-theme functions.php allready a test for autoclose lightbox after youtube video stops – but it does not work now
it is much more complicated from the inner of the iframe to close the iframe after playing. But to prove the avia.js case you can erase it here.
Maybe yu got an idea – pleas look to the other thread
https://kriesi.at/support/topic/autoclose-video-lightbox/
Hi,
I changed the code to following one
add_action( 'wp_enqueue_scripts', 'wp_change_aviajs', 100 );
function wp_change_aviajs() {
wp_deregister_script( 'avia-default' );
wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true );
}
Please review your website now
Best regards,
Yigit
hm – just the rearrangement did the trick ? OK
Is it important to have allways the add_action first and than the function.
Because a lot of php tips here on board handle it this and that way?
Hey!
I changed the hook from “wp_print_scripts” to “wp_enqueue_scripts” and “wp_dequeue_script” to “wp_deregister_script” :)
Best regards,
Yigit
oh sorry now i see – thanks – can be closed