Title: Adding a &lt;script&gt; to sidebar.php
Last modified: August 18, 2016

---

# Adding a <script> to sidebar.php

 *  [repomonkey](https://wordpress.org/support/users/repomonkey/)
 * (@repomonkey)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/adding-a-ltscriptgt-to-sidebarphp/)
 * Hi guys – hoping you can help me with this. Currently customizing my blog and
   I’d like to insert a little weather widget in the sidebar. The code is:
 * <script type=”text/javascript” src=”[http://www.weatherchannel.com.au/Magic94scripts/mgrqispi94.dll?appname=WC&prgname=WOYS&Id=3904″></script&gt](http://www.weatherchannel.com.au/Magic94scripts/mgrqispi94.dll?appname=WC&prgname=WOYS&Id=3904″></script&gt);
 * But I have no idea how to tailor that so it’ll function in the sidebar file –
   anyone help, or is this sort of thing not possible?
 * Cheers

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/adding-a-ltscriptgt-to-sidebarphp/#post-409461)
 * You might try using the WordPress Widget Plugin but that could require ‘widgetizing’
   your Theme.
 * In the Codex article, [WordPress Widgets](http://codex.wordpress.org/Plugins/WordPress_Widgets),
   there is a Resources section that has links to the widget download and information
   on making your theme wigdet capable. There’s also a list of Themes that are already
   widget capable as well as a list of Widgets.
 *  [manstraw](https://wordpress.org/support/users/manstraw/)
 * (@manstraw)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/adding-a-ltscriptgt-to-sidebarphp/#post-409477)
 * You can generally edit sidebar.php in your theme folder. Or, install widgets 
   as MichaelH suggested. If you install widgets, you can add a text widget (already
   available with the basic install) and put your javascript in there. It’s that
   easy.

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

The topic ‘Adding a <script> to sidebar.php’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [manstraw](https://wordpress.org/support/users/manstraw/)
 * Last activity: [19 years, 11 months ago](https://wordpress.org/support/topic/adding-a-ltscriptgt-to-sidebarphp/#post-409477)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
