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:

So their is no using this theme without having a widget compatible theme? I would really like to use the theme I hacked together and just be able to add some code to my sidebar.php file.
Any chance this can happen? Thanks…
What code do I use to get it to show on my site? I’m using WP
Ditto to what Rhon said. I hate widgets and there are still a whole lot of people who avoid them like the plague. Would be nice if this didn’t require a “idget” ready theme. I’m sure there is a work around and just a matter of time before somebody posts it. If I were talented enough, I would.lol
I found a simple solution – if you’d like to include this, assuming you’ve already done the configuration part, insert this anywhere in your template.
<?php if ( function_exists('weather_display')) weather_display(); ?>Fatal error: Cannot instantiate non-existent class: simplexmlelement in /srv/www/vhosts/sunsonic.de/subdomains/ardiem/httpdocs/1988er/wp-content/plugins/wp-weather/wp-weather.php on line 204thats what happens when i try to display the plugin on my blog
1988er — you don’t have php5 if you get that error. The next release of this plugin will check for it upon activation and not allow you to activate if the host is not compatible.
Hi,
Is there any possibility that the temperature will be shown in Celsius as well.
Thanks in advance,
Marc
Any chance the next version could have a 2-3 day forecast. It would be great if an effect like Yahoo.com has for their weather display could be used. I.E.: When you mouseover the current weather, it animated down to reveal the 3 day forecast.
Please add the option to view the forecast for the next few days.
Marc: it is actually very easy to add whatever you want to this and change to metric.
Just specify more in the $forecast_url
$forecast_url = 'http://xoap.weather.com/weather/local/' . $location_id . '?cc=*&dayf=' .$forecast_length .'&prod=xoap&par=' . $partner_id . '&key=' . $license_key . '&ut=C&ud=k&us=k&up=m&ur=m';I am also working on localizing this for Chinese right now, the xml is fairly straight forward for how to add things you want
Hey Matt, (or anyone who can help with this one)
I am getting annoying errors, which range from annoying to admin-panel destroying.
Here’s my code for the translations, as you may notice, it is not complete yet due to a lack of a full list of what each graphic actually represents (that would be helpful)
http://www.notaclue.ktcs.net/dev/wp-weather.txt
The error I am getting is this:
Warning: Cannot modify header information – headers already sent by (output started at /PATH/public_html/wp-content/plugins/wp-weather/wp-weather.php:1) in /PATH/public_html/wp-includes/pluggable.php on line 329
I am stumped as I am not great with php and have been away from coding for a few years, any help is greatly appreciated.
Thanks
welp, i’m an idiot.
if anyone else is getting this problem, edit .htaccess and throw in
PHP_FLAG output_buffering on
I’m trying to get the weather widget working, and keep getting this error:
WordPress database error: [Table 'hawaiibnb_com_2.wp_weatherxml' doesn't exist]
Where can I find information on setting up this table in my database?
Sharon – your wordpress version might not have the required dbDelta function. If you can log into your phpmyadmin and execute this sql, you should be set.
Hi,
Do you have a time schedule for making this work for PHP Version 4.3.11? I have the same error on line 204 as 1988er.
As it isn’t working on my server, is it worth the wait – does the service work for places outside the US?
Thanks,
Andy