yan-k
9/22/2017 - 8:28 AM

Enfold - Load Custom avia.js

Enfold - Load Custom avia.js

<?php 
if(!is_admin()) add_action('wp_enqueue_scripts', 'avia_register_child_frontend_scripts', 100);
function avia_register_child_frontend_scripts()
{
	$child_theme_url = get_stylesheet_directory_uri();
	wp_dequeue_script('avia-default');

	//register js
	wp_register_script( 'avia-default-child', $child_theme_url.'/js/avia.js', array('jquery'), 1, true);
	wp_enqueue_script( 'avia-default-child' );
}