Suppose I want to do this:
https://kriesi.at/support/topic/enfold-logo-resize/
But I want to put my changes in a Child Theme so they do not get overwritten.
How would I go about this?
I tried duplicating the ‘js’ folder into the Child Theme folder but it does not work right away.
I’m assuming something needs to be added to the ‘functions.php’ of the Child Theme, but I’n not sure what the syntax would be.
Thanks!
~R
Hi!
Yes, try with this code:
// Replace avia.js
function 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_enqueue_scripts', 'change_aviajs', 100 );
Regards,
Josue
Thank you very much Josue!
hey Josue – nice to hear from you again!
Are you doing well?
Edit – oh wow – sometimes i have to look to the posting time . Sorry – Hope he is fine