Title: External JavaScript
Last modified: August 21, 2016

---

# External JavaScript

 *  [Christine357](https://wordpress.org/support/users/christine357/)
 * (@christine357)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/external-javascript-1/)
 * When I first got my WordPress page up one of the first things I did was attach
   an external JavaScript file and the JQuery file to go with it. I didn’t have 
   any problems getting the JavaScript to register but now after doing a reset and
   creating a child theme and all that good stuff, I can’t seem to get it to register
   it’s existence at all.
 * Doing research on the matter I keep running into information from this codex:
 * [http://codex.wordpress.org/Function_Reference/wp_enqueue_script](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)
 * Has something recently been changed that you can’t manually include script tags
   in the header?
 * If so, I’m really confused by the codex how to implement my two .js files. Help
   on the matter would be appreciated!
 * But I’ve also seen in I think another codex using something like:
 * `<script type="text/javascript" src="<?php echo get_template_directory_uri();?
   >/myScript.js" ></script>`
 * But that doesn’t seem to get me anywhere cept an error:
    `Uncaught SyntaxError:
   Unexpected token < error404.000webhost.com/?:1`
 * As well as an error that also appears with the regular script tags that I researched
   and was told I need to disable the analytics code of my site since I use 000webhost.
   When I disabled the code it went away, but when I use the script tag above that
   has the bit of php in it it comes back:
 *     ```
       Resource interpreted as Script but transferred with MIME type text/html: "http://error404.000webhost.com/??". hurkybird.com:12
       Uncaught SyntaxError: Unexpected token < error404.000webhost.com/?:1
       ```
   
 * Perhaps these errors are all irrelevant if I just have to use the technique from
   the codex I linked above?

Viewing 1 replies (of 1 total)

 *  [Krishna](https://wordpress.org/support/users/1nexus/)
 * (@1nexus)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/external-javascript-1/#post-4249587)
 * Please contact your host as free and restricted hosting providers do not allow
   such scripts. Also note that WordPress does NOT work properly with such hosting.

Viewing 1 replies (of 1 total)

The topic ‘External JavaScript’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Krishna](https://wordpress.org/support/users/1nexus/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/external-javascript-1/#post-4249587)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
