wp-weather

Latest version: 0.3.7
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.

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.

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:

203 responses to “wp-weather”

  1. Chris

    Matt

    Got the error code as for some reason its just started showing again, without any updates or changes since I thought I’d fixed it:

    Invalid query: Duplicate entry ‘UKXX0446′ for key 1

    Depending which page I load, the UKXX0446 changes according to the location.

    I’ve had to disable the plugin for now so my site continues to work.

  2. Rodger Gallagher

    Hi Matt

    Thanks for doing the lates update. As per the comment for Chris, I have the same rror message:
    Invalid query: Duplicate entry ‘NZXX0013′ for key 1

    When I go to the Settings page and click, ‘Save’ without updating anything, it then works OK.

    Regards,

    Rodger

  3. Rodger Gallagher

    Thanks Matt. Last lot of fine tuning has it fixed.

  4. Ali

    Hi. I’m working on a WordPress site and I’l like to use your widget. I obtained the partner id and license key from Weather.com, but get this in place of where the widget should be…

    WARNING isterxmlexpatnonvalid->parse(): expat: no element found [-1/0/1]
    Incomplete forecast XML received.
    Please refresh your browser.

    Any thoughts on how to resolve this?
    Thanks!

  5. leo b

    is there php code to hard code the weather applet?

1 ... 12 13 14

Leave a Reply