May 5, 2016 at 7:40 pm
#44711
ilayxz
Participant
I created a child theme and accordion.js is a javascript, which is in folder interface-child\js located.
So; interface-child/js/accordion.js.
Am I to use the following code at interface-child/functions.php to Loading the javaScript: (?)
add_action( 'wp_enqueue_scripts', 'interface_enqueue_accordion' );
function interface_enqueue_accordion() {
wp_enqueue_style( 'interface', get_template_directory_uri() . '/accordion.js' );
}
I think, it said to be ‘js/accordion.js’ instead of ‘/acoordion.js’. But it doesn’t work in both case.
Thank you