So, I'm trying to mess around with WordPress and I've run into a simple issue that I can't find answers to on the codex... probably 'cause its a simple fix. :)
I've got a functions.php file that is attempting to call an external js file like so:
function place_theme_scripts() {
wp_register_script( 'javascripting', get_template_directory_uri() . '/js/rspnsv.js', array(), '1.0.0', true );
wp_enqueue_script( 'javascripting');
}
add_action( 'wp_enqueue_scripts', 'place_theme_scripts' );
?>
The my 'rspnsv.js' file is under my themes directory in a file called 'js'. Seems simple enough, but this isn't working. Its not the javascript, since it runs smoothly when I place it inline. I'm clearly messing up something simple with this whole wordpress php function. Can anyone spot anything? Give me a pointer? Thanks!
rspnsv.js, should be in the footer, check that the file is added, and that the script tag and the path are outputted correctly etc.file called 'js'- I assume it is a typo and you wanted to write afoldercalled JS ?? anyhow, did you, for sake of testing / developing, enqeued another script with the same handle ??(javascripting)- try changing the handle name to something else ..