Title: Using .js in template
Last modified: August 21, 2016

---

# Using .js in template

 *  [Kalmirew](https://wordpress.org/support/users/kalmirew/)
 * (@kalmirew)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/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/](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.

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * 0 replies
 * 1 participant
 * Last reply from: [Kalmirew](https://wordpress.org/support/users/kalmirew/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/using-js-in-template/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
