What is the best way to add a script via a child theme? I added a js/ folder to the child theme where I’ve put a custom script in.
Thanks
What is the best way to add a script via a child theme? I added a js/ folder to the child theme where I’ve put a custom script in.
Thanks
Hey Albatique,
The best way to add JS to the theme is via the wp_enqueue_scripts
function. Have a look at the codex below re using javascript in WP for more info.
https://codex.wordpress.org/Using_Javascript
Ben