Weather Widget

UPDATE: Corrected output to meet WC3 XHTML 1.0 Transitional Standards

I thought I would take a shot at creating a Widget to display the standard weather sticker. I could have used the built in Text Widget to add the needed code to display their weather sticker, but whats the fun in that. After checking out the provided samples and a few minutes of cursing, I managed to get my widget to work. Unfortunately for my foreign friends, the weather widget only allows you to enter US locations.

To install the weather widget:
Just upload wunder.php into the wp-content/plugins/ directory, activate the module from the Plugin Management page, and then go to the Sidebar Widgets page to configure your Title, City and State.

Configuration Example

31 thoughts on “Weather Widget

  1. Pingback: WordPress Widgets » Blog Archive » Weather

  2. Hi. I entered my info and it says “city not found”. Any ideas–I live in a state capitol, so hopefully wunderground has heard of it…

  3. Hi jivyb,

    It should work fine for your location. Are you entering the entire state name or the abbreviation? It will only work if you use the abbreviation, for example use TX not Texas.

  4. I had the zip code instead of the state abbreviation. So I changed it but now it just displays the title and nothing else. I know this can’t be that complicated!

  5. Hiya,

    I’ve installed his Widget on my Blog, and although the Widget works, it doesn’t seem to find my town.
    If I visit the website and search for Wolverhampton (my town), it finds it.
    But unfortunately, on the Widget it doesn’t.

    Do I have to be a US resident and therefore have to enter a US zipcode? I live in the UK.

    Kind Regards,

  6. I’m just repeating what people are saying. The widget is installed fine but it says “Error. City Not Found.’

  7. Hi Parm,

    Sorry but this does not work for locations outside of the US. uses the city/state format for US locations only and all other locatiuons are based on station numbers. I created this for a friend that uses the sticker on his blog and wanted to switch to widgets. This widget was just so I could check out how widgets worked and make a friend happy. I realize it may not work for everyone but I thought I would share it anyway. To be honest there are several excellent weather plugins available that will be widgets soon. You may want to take a look at WeatherIcon as the creator says there is a widget in the works.

  8. Pingback: A Blue Eyed Buddhist - Living life in the big city… » Updates…

  9. Hello!

    I too am having problems getting this to work. I’m getting the “Error: city not found” as well. I live in Sacramento, CA and have tried about 10 different zip codes and get the same thing. The kicker is that if you click on the error, it takes directly to the weather for my city on wunderground. To make matters worse, my husband has this same widget on his blog page and it works perfectly.

    The guy that does the WeatherIcon has yet to release a widget version either…

  10. Hi FireDancer,

    It seems your error is related to my wording and I will change that.
    Please enter the following and this should work for you.

    City: Sacramento
    State Postal Code: CA

  11. Hooray! It works! Now, how it’s working on my husband’s site with the zip code in the ‘state postal code’ field is another story. 😛

    Sorry for being such a noob. 🙂

  12. Pingback: » links for 2006-08-28

  13. I installed this and set it up properly with the town:

    Hilton Head Island
    State: SC

    I get error city not found even though I can click on the image and get the correct weather for my area, what’s going on?

  14. Pingback: » Manipulating Wordpress Widgets

  15. Pingback: - good to know

  16. I’m also having some problems with “Error. City Not Found”, but I’ll give it an other shot tomorrow and we’ll see if I can get it to work. Anyhow, great idea for a widget! Thanks

  17. Thanks for an elegant implementation of a weather widget.

    I’m not having any problem getting the sticker to display. But I do have one odd issue – the time display for the sticker is off by an hour. I’ve checked, and my time zone is set correctly in the WordPress General Options. Is there a way to fix that localization issue?

  18. Pingback: My Adventures » New New New

  19. I’m using your weather widget in my left sidebar with a black background. Can you advise on what code to add/change to make the font color of the widget text white? I had no installation troubles but the black text on black background defeats the purpose. Appreciate any help!

  20. Pingback: Wordpress Weather Widgets for Local Blogs | Top Blogger

  21. Pingback: Wordpress Widget List

  22. Pingback: Weather sticker blogger | Askeyguitar

Comments are closed.