Using .js in template
-
Hello there,
I am writing because I’m a bit confused about how to use js with WordPress. I have to admit I already don’t know much about js.
I am trying to add to my homepage the filtered item slider which can be found here: http://tympanus.net/codrops/2012/12/31/how-to-create-a-simple-multi-item-slider/ I have made my homepage out of a custom template and I don’t wish to have my slider appear on any other page / template.
I’ve followed the procedure to set up this slider as part of my homepage template. It seems to be functional apart from the javascript. And there’s where I got lost …
I have added my two .js files to the root folder of my theme. Is that what I was supposed to do?
Also, I have found in the codex a page explaining the wp_enqueue_script() function, supposedly used for js. I’ve read it and yet I am not sure of what I am supposed to do. Am I supposed to include a new function in function.php in order to have my js to work? If so, how should I proceed?
I hope my requests are clear enough for you to understand!
Thanks in advance.
The topic ‘Using .js in template’ is closed to new replies.