I am trying to add my custom scripts to my project but can seem to get them to load. I’ve never had this issue and am stumped. This is what I have in my functions.php:
function ex_scripts() {
wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'backgroundJS', get_template_directory_uri() . '/js/background.js', array('jquery'), '1.0.0', true );
wp_enqueue_script( 'superJS' , get_template_directory_uri() . '/js/supersized.core.3.2.1.js', array('jquery'), '1.0.0', true);
}
add_action( 'wp_enqueue_scripts', 'ex_scripts' );
I know the ex_scripts function is running. I added a echo "hello"; die();
statement to the top of the function and it worked. I also know the js filepaths are correct and that they are accessible. jQuery will load both with or without its enqueue script (because it’s listed as a dependency of the lower two), but my custom scripts aren’t being added.