Title: Adding in scripts to pages
Last modified: August 19, 2016

---

# Adding in scripts to pages

 *  [g7kse](https://wordpress.org/support/users/g7kse/)
 * (@g7kse)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/adding-in-scripts-to-pages/)
 * I’ve got a directory that is constatly updated with gif images every hour. I’ve
   had to ‘copy’ my page template to display these updated images as the script 
   used doesn’t seem to work on a normal page.
 * is thera plugin that can run this code, there’s 3 images updated but the code
   for one of them is….
 *     ```
       var d = new Date();
       var m = d.getUTCMonth()+1;
       var day = d.getUTCDate();
       var yr = d.getUTCFullYear();
       var sname = yr+"-"+(m < 10 ? "0" + m : m)+"/S-"+yr+"-"+(m < 10 ? "0" + m : m)+"-"+(day < 10 ? "0" + day : day)+".gif";
       var pname = yr+"-"+(m < 10 ? "0" + m : m)+"/P-"+yr+"-"+(m < 10 ? "0" + m : m)+"-"+(day < 10 ? "0" + day : day)+".gif";
       document.write("Signal to noise ratio - Today");
       ```
   
 * document.write(“<table><tr><td width=\”800\”><p align=\”center\”><img src=\”scale.
   gif\” width=\”519\” alt=\”Scale\”><br><img src=\””+sname+”\” width=\”519\” height
   =\”1038\” title=\”SNR Today\”><br>SNR</td>”);
    document.write(“</tr></table><
   br><hr><br>”);
 * Any help for a numptie would be appreciated.
 * Ta
 * Alex

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

 *  [syncbox](https://wordpress.org/support/users/syncbox/)
 * (@syncbox)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/adding-in-scripts-to-pages/#post-679730)
 * try using the (is_page()) conditional to echo the script (don’t forget to include
   the script tags) in your page.php file?
 *  Thread Starter [g7kse](https://wordpress.org/support/users/g7kse/)
 * (@g7kse)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/adding-in-scripts-to-pages/#post-679766)
 * I’ve ended up creating a page template with the code in it and it seems to do
   the trick nicely. Thanks for the help though
 * Alex

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

The topic ‘Adding in scripts to pages’ is closed to new replies.

## Tags

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

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 2 replies
 * 2 participants
 * Last reply from: [g7kse](https://wordpress.org/support/users/g7kse/)
 * Last activity: [18 years, 2 months ago](https://wordpress.org/support/topic/adding-in-scripts-to-pages/#post-679766)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
