Title: Loading Javascript Files
Last modified: August 19, 2016

---

# Loading Javascript Files

 *  Resolved [David Calhoun](https://wordpress.org/support/users/dpcalhoun/)
 * (@dpcalhoun)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/loading-javascript-files/)
 * Hi.
 * I’m a little flustered with this, because I’d think I could figure this out on
   my own. But I’m having trouble getting Javascript loaded into a WordPress site.
   I’ve read up on using the “wp_enqueue_script” function to get jQuery loaded, 
   and that seems to be woring alright.
 * What I can’t get working, is loading my specific Javascript file I need. I’m 
   using the following after the “wp_head” function:
 * `<script type="text/javascript" src="js/scripts.js"></script>`
 * When I look at the loaded page’s source, it shows the script calling in jQuery,
   but doesn’t show the script calling in my specific “scripts.js” file. It’s not
   even a part of the page. I’ve tried inserting the “bloginfo(‘template_directory’)”
   in there as well:
 * `<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/
   js/scripts.js"></script>`
 * What am I doing wrong?
 * This is the Javascript slider I’m trying to incorporate into my page: [http://www.dreamcss.com/2009/04/create-beautiful-jquery-sliders.html](http://www.dreamcss.com/2009/04/create-beautiful-jquery-sliders.html)

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

 *  [cjg248](https://wordpress.org/support/users/cjg248/)
 * (@cjg248)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/loading-javascript-files/#post-1295022)
 * I am having the same problem. What did you do to fix this issue?
 *  Thread Starter [David Calhoun](https://wordpress.org/support/users/dpcalhoun/)
 * (@dpcalhoun)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/loading-javascript-files/#post-1295044)
 * I honestly don’t remember, I think I overlooked something small. I’ve been able
   to use Javascript fine on many sites since then. If you are still having trouble
   with this, comment back and I’ll try to help you out.
 *  [ElectricOwl](https://wordpress.org/support/users/electricowl/)
 * (@electricowl)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/loading-javascript-files/#post-1295046)
 * Hi,
 * I’m also having an issue loading JS from a plugin I’m building. As far as I can
   tell I have correctly queued the JS.
 * I think the issue is that the JS files are not being ignored by the router (template-
   loader)/,htaccess and are causing a 404 when the url fails to resolve. Just theory
   at the moment.
 * Bit of a weird one but probably related to the slightly mad way that WP does 
   certain things.
 * Ian

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

The topic ‘Loading Javascript Files’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [ElectricOwl](https://wordpress.org/support/users/electricowl/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/loading-javascript-files/#post-1295046)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
