Tagged: child theme
I’m wanting to change some functionality of Enfold via using a child theme. Some modifications I am hoping to make require changing the Enfold files instead of through the child theme – but I’m concerned with these modifications being lost when Enfold is updated. An example of the modifications I am hoping to make is through modification of the appropriate .js file change the size of the shrinking sticky header.
Assistance is much appreciated.
Hey cullingfordconsulting,
If you are using a child theme, 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
Please also see following links – http://kriesi.at/documentation/enfold/using-a-child-theme/, http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/, http://kriesi.at/documentation/enfold/child-theme-translations/
Best regards,
Yigit