Title: Can&#039;t attach Javascript to theme
Last modified: August 21, 2016

---

# Can't attach Javascript to theme

 *  [tmyie](https://wordpress.org/support/users/tmyie/)
 * (@tmyie)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/cant-attach-javascript-to-theme/)
 * I’m currently learning theme development, and tweaking the twentytwelve theme.
   I’ve got an external javascript file I’m trying to link, but it won’t seem to
   register. The codex tells me:
 * `<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/pathto/
   yourscript.js"></script>`
 * which I’ve changed the filename, to suit my purpose:
 * `<script type="text/javascript" src="<?php bloginfo('template_url'); ?>//trans.
   js"></script>`
 * However, this is still not working. Am I missing something?

The topic ‘Can't attach Javascript to theme’ is closed to new replies.

## Tags

 * [external](https://wordpress.org/support/topic-tag/external/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [js](https://wordpress.org/support/topic-tag/js/)
 * [Stylesheet](https://wordpress.org/support/topic-tag/stylesheet/)

 * 0 replies
 * 1 participant
 * Last reply from: [tmyie](https://wordpress.org/support/users/tmyie/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/cant-attach-javascript-to-theme/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
