Title: calling javascript from template file
Last modified: August 19, 2016

---

# calling javascript from template file

 *  [barklay1](https://wordpress.org/support/users/barklay1/)
 * (@barklay1)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/calling-javascript-from-template-file/)
 * There is a spot above the two right sidebars reserved for ads and uses a template
   file called ads.php. I have one ad to put in that spot that unfortunately is 
   in javascript and I just can’t get anything to appear. I have entered this in
   my header file right after the meta tags:
 * <script type=”text/javascript” src=”/ad1.js”></script>
 * and this is all that is in my ad.php file:
 * <div id=”ads”>
    <script type=”text/javascript”> <!– ad1(); //–></script> <img
   src=”<?php bloginfo(‘template_url’); ?>/images/ad.jpg” width=”125″ height=”125″
   alt=”Your Ad Here” /> <img src=”<?php bloginfo(‘template_url’); ?>/images/ad.
   jpg” width=”125″ height=”125″ alt=”Your Ad Here” /> </div>
 * Is there help out there?

The topic ‘calling javascript from template file’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [barklay1](https://wordpress.org/support/users/barklay1/)
 * Last activity: [18 years, 2 months ago](https://wordpress.org/support/topic/calling-javascript-from-template-file/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
