wp-weather

Latest version: 0.3.8
Please update to the latest version. I apologize for the rash of updates, but this version should fix all issues while allowing multiple forecasts to be used. Hopefully this will be the final update for quite some time.

Download link: http://wordpress.org/extend/plugins/wp-weather/

I have been using weather.com’s XML web service to display local weather information on my family website for several years. I decided to make the PHP code into a widget for wordpress. Here’s where you sign up for their service: http://www.weather.com/services/xmloap.html

This widget uses a database table to cache the data for a half hour to avoid hammering the web service. Additionally, if you are using the wp-cache plugin, any changes to the options clear the cache.

To install: upload to your plugin directory, activate the plugin, set the options and add the widget to your sidebar. Your location ID is a zip code for US and an alphanumeric code for international. Take Dublin for example – when searching for Dublin on weather.com you are taken to the following page: http://www.weather.com/weather/today/Dublin+Ireland+EIXX0014 and EIXX0014 is the location code.

Additionally, you may use a shortcode on any post or page.
[weather_display]
If you want to show different cities on different pages/posts you can specify a location id:
[weather_display location_id="75034"]
If you’d like to display more days than default (what you set in the plugin options page):
[weather_display forecast_length=5]

weather.com has made changes to their servers which now REQUIRE you to enter a partner id and license key in this plugin’s settings. If you do not, they will not send the complete forecast data which in turn will break this plugin.

Preview:

221 responses to “wp-weather”

  1. Tony Kawakawa

    when i use wp-weather (downloaded from your site) the following error appears

    Local Weather
    Warning: strtotime() [function.strtotime]: Called with an empty time parameter. in /home2/tonykawa/public_html/wp-content/plugins/wp-weather/wp-weather.php on line 177

    TIA

  2. Marissa

    I’ve added the widget and selected all the options, but it’s just not showing up.

    http://www.scwd.us

  3. Marissa

    I was able to get this working. I could still see WP-Weather after moving my WordPress installation to a different directory, however, it wasn’t actually installed. I removed and re-added it through the WordPress panel and it worked.

  4. Sabo

    Is there a way to make the plugin grab a variable, so lets say depending on the category of the site, it displays the weather, e.g.

    http://www.domainexample.com/category/new-york/

    Show the New York weather.

    Regards!

  5. Nita

    I was able to download and add the widget. however when I click on configure, the only option i get is Title: Local Weather. What am I missing?

  6. Nita

    hello:
    I was able to install this on my first blog. Now I have added this in the second blog on the sidebar. It is showing up fine, however the sidebar for this theme has background for each set(archive, category, etc..) and this background does not get applied to this plug-in.Which file do i have to alter so i can apply class to this plugin too so that it blends with the rest of the other stuff on the sidebar. unfortunately my blog is internal and am not able to post the link here.
    The theme link(Green Bug 1.1):
    http://themes.wordpress.net/page/7/?cats0=25&sortby=date&order=DESC&andor=OR&submit=Show
    Source code: Weather plugin has:

    Local Weather

    The other sidebar calendar has:

    Calendar…..

    Thanks for the help.

  7. Flahute

    I’ve been getting the same “Table does not exist” error as Sharon (see comment dated May 28).

    When I enter the SQL query into myPHPadmin as below:

    CREATE TABLE flahute_com.wp_weatherxml (
    xml_url varchar(150) NOT NULL DEFAULT '',
    xml_data text NOT NULL
    last_updated datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
    KEY xml_url (xml_url)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

    I get the following error:

    MySQL said:

    #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'last_updated datetime NOT NULL DEFAULT '0000-00-00 00:00:00',

    Any ideas? What am I missing?

  8. Todd

    Hey there….I’m trying to get the widget to jive with the CSS of my WordPress theme, but I nothing I do is changing the text color. Is there a trick to this? I have a theme with a black background and I can’t get the text in the widget to be anything other than black.

  9. WordPress Plugins Database » Plugin Details » wp-weather widget

    [...] Visit [...]

  10. Veronica

    I installed and activated the plugin. However, if I add it to the widget sidebar or edit the sidebar php file, an insane amount of errors appear down the page… how can I fix this?

  11. Taryn

    I have the plugin widget running on my site, but can’t seem to get the css right so that it looks like the other widgets in my sidebar. Can you guide me in the right direction. Nothing I do to the css seems to make any difference. Thanks!

  12. me

    thank you for all your hard work, people should understand you are doing this for free and not expect the world! in any event, i just want to fix this: “The data from weather.com is cached in the database for one half hour to avoid unnecessary calls to the web service.” we live in a severe weather zone and 30 minutes can literally make the difference between life and death! thanks for your contribution!

  13. swiss420

    Hi first off thanks allot for your hard work. Works great on allot of my Blogs. On my sites I changed the weather pictures maybe someone is interessted? Found them to be more appealing to my site. http://start.swiss420.ch In that sense how about a theme collection on your site of different Weather Pictures to fitt the different Webstyles? Also language translations would be interessting. Always have to go in and change everything around with each new version. Would it be possible to share the work on your site? No Problem if you dont have time. Allready happy with all the work you put in. Just giving some Feedback from little old Switzerland. Note to everyone with Problems. Try Firefox with Firebug it will help you solve many format etc. related Problems.