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 wunderground.com 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. 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…

  2. 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.

  3. 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!

  4. 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 Wunderground.com 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,
    Parm

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

  6. Hi Parm,

    Sorry but this does not work for locations outside of the US. wunderground.com 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 wunderground.com 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. Irealize 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 creatorsays there is a widget in the works.

  7. 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…

  8. 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

  9. 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. :P

    Sorry for being such a noob. :)

  10. 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?

  11. 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

  12. 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?

  13. 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!

  14. Doch nach Serrano fragte ihn, ob oder nicht, das h枚chste Gericht der Land w眉rde auch durch eine Gerechtigkeit, die noch nie ein Richter gewesen war, bedient zu werden, Thomas antwortete nicht nur bejaht, sondern auch angedeutet, dass Serrano w盲re besser dran, suche einen Sitz im Obersten Gerichtshof als ein Stuhl im Oval Office.

  15. Dieser Aufwand kostenlose Version von Knoblauchbrot wird mit Streicheleinheiten von Knoblauch "Butter" (in der Tat, Margarine) gef眉llt. Es war eines der besseren Baguettes von den meisten Mitglieder des Gremiums gew盲hlt. "Dieser eine gute, frische Aroma und Geschmack, und einen sch枚nen knusprigen Kruste hat", sagte Steve Jobs. "Ein guter Farbe, die beste Kruste, aber teigigen innen. Nichts wie so gut wie ein Brot mit hausgemachter Knoblauchbutter gef眉llt", sagte Linda Collister. Aber das Brot links Michael Bateman sprachlos: "Zu schrecklich f眉r Worte."

  16. The absurdity of it all is that more than half of the NBA makes the playoffs. It should be impossible for good teams to miss the cut. And yet, with its conference system, the NBA accomplishes just that.

  17. as is my method of learning i have ripped this poor sock out at least three times (not that i am keeping count) but that is how i learn by practice. i dont see the point of abandoning half socks or socks that dont work out. so photos taken and then rip rip rip.

  18. Je suis pour certaines abréviations mais contre les avalanches de fautes d’orthographe et kikoololisme. Quand j’essaye de lire sur les feuilles de certains amis à l’école, c’est juste impossible vu le nombre de fautes, alors quelques unes j’veux bien, mais pas jusqu’à qu’on ne puisse plus rien réussir a lire.

  19. A lot of these wow gold are like an aspiration the reality! I got the typical overcast simple styles fro holiday season and i also didn’t prevented having these products. I personally carry them how to education as well as this base stay designer non-stop. It is best to sequence any waterproofing equipment web based to successfully water-resistant them with winter along with bad weather. Purchase single size-up mainly because they frequently jog small. I want all of these wow gold!!

  20. Berkley Baker siffla en 18 points pour mener Rapoport (22 6, 9 1 dans le district 19 1A). Devonte Henderson a ajout茅 17 points et Blaine Listach a marqu茅 16.

  21. I precisely wanted to say thanks once more. I do not know what I might have undertaken in the absence of the type of creative ideas shared by you concerning such concern. Entirely was a fearsome difficulty in my opinion, however , noticing this well-written way you solved it forced me to cry over happiness. Now i am thankful for this guidance as well as expect you recognize what a great job that you’re putting in training some other people via a web site. I’m certain you’ve never come across any of us.

  22. I want to express my appreciation to the writer just for bailing me out of this type of circumstance. Right after surfing around throughout the online world and getting strategies that were not pleasant, I was thinking my entire life was gone. Being alive devoid of the strategies to the issues you have sorted out through your main guideline is a crucial case, and those that could have in a negative way affected my entire career if I hadn’t discovered your blog post. Your own knowledge and kindness in touching all the stuff was very useful. I don’t know what I would have done if I hadn’t come across such a point like this. I’m able to at this moment look forward to my future. Thanks for your time very much for this high quality and results-oriented help. I won’t be reluctant to refer your web blog to any person who needs to have recommendations about this situation.

  23. I precisely desired to appreciate you once again. I’m not certain what I might have implemented without the actual suggestions revealed by you about that area. It has been a real intimidating crisis in my view, nevertheless spending time with the very expert form you treated the issue forced me to jump for fulfillment. I will be happier for your help and as well , hope you find out what a great job you happen to be accomplishing teaching people today thru a blog. I am sure you have never got to know any of us.

  24. I wish to express appreciation to this writer for bailing me out of this particular crisis. After looking out through the online world and finding ways which were not beneficial, I believed my entire life was well over. Living without the presence of solutions to the difficulties you’ve resolved by means of your main guideline is a crucial case, as well as those that would have negatively damaged my career if I hadn’t come across your blog post. Your actual natural talent and kindness in handling everything was useful. I am not sure what I would have done if I hadn’t encountered such a subject like this. I can at this moment relish my future. Thank you very much for the impressive and amazing guide. I will not hesitate to recommend your web site to anybody who ought to have recommendations on this subject matter.

  25. I simply wanted to say thanks yet again. I do not know the things that I would have used in the absence of the smart ideas discussed by you relating to my theme. It previously was an absolute horrifying setting for me, however , being able to view the professional style you treated it took me to leap over fulfillment. I will be happy for the help and then trust you realize what a powerful job that you’re carrying out instructing the mediocre ones thru your websites. I know that you have never encountered any of us.

  26. I want to show my appreciation for your kindness for folks that really need help on this idea. Your special commitment to getting the solution throughout had become astonishingly advantageous and has regularly enabled others like me to realize their ambitions. This important information can mean this much to me and further more to my colleagues. Thanks a lot; from everyone of us.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>