Title: Where to put Javascript file?
Last modified: August 18, 2016

---

# Where to put Javascript file?

 *  [erusch](https://wordpress.org/support/users/erusch/)
 * (@erusch)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/where-to-put-javascript-file/)
 * In another post I learned that to use javascript on my pages I need to place 
   the script in a separate file and link to it like this: <script src=”/yourfile.
   js” type=”text/javascript”> </script>
 * I’m (obviously) a little green at this. Can someone tell me where to create this
   file, if I have to name it anything in particular and if there’s any special 
   tags that have to wrap the javascript in this file? Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/where-to-put-javascript-file/#post-346458)
 * This might be a good place to start with: [Using_Javascript](http://codex.wordpress.org/Using_Javascript).
   Does it help?
 *  [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * (@vkaryl)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/where-to-put-javascript-file/#post-346461)
 * Well, you really don’t have to do that. I’ve got perfectly usable inline js in
   various blogs. For instance, I’ve got adsense inline among other things.
 * As far as an external file, just put it somewhere easy, like your blog root. 
   Or if it’s something like minmax.js (that you might want accessible from somewhere
   else in your site), put the file in your site root. Doesn’t matter as long as
   you use the absolute address to link to it.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Where to put Javascript file?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * Last activity: [20 years, 3 months ago](https://wordpress.org/support/topic/where-to-put-javascript-file/#post-346461)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
