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. james mcintosh

    Having trouble trying to add a second city. Any clues for me?

  2. lisa

    Yes, I too am looking for how to include multiple cities. I haven’t found one single solution for any type of weather widget. Could anyone help us with this? Thanks in advance!

  3. skee

    Matt, I installed this plug in and it worked well till last week. Now I notice that the data is not refreshing unless we click on the “update options” button on the plugin page.

    Do you know why this might be happening? Should I try changing the refresh rate to .1 instead of .5 and see?

    Let me know how I can fix it.

  4. Trent Harlan

    This widget crashes on me every once in a while and I can’t figure out why, it takes out all of my other widgets that are beneath it on the sidebar and my footbar – big long exception code. I can fix it immediately by going into the admin settings and just refreshing the settings – then it’s fine. Any idea why this happens?

  5. Lincoln

    I love this plug in, its the most elegant solution for adding weather to a site. I want to add it to my template and want it to be Horizontal instead of vertical, any suggestions for updating the css it make that work?

    (If you view my site, im hoping to feature it across the very top of the page and fit it to the same width as my template.)

    Later ill change the graphics to match my theme.

  6. Lincoln

    Now, after reading it may not be as simple as a css update to display horizontal, any suggestions will be appreciated. Looks like paragraph and line break tags are what puts this in line, not sure how i could make it sidways…

  7. Andy Jackson

    Just wanted to second what Trent said. Around ever 4/5 loads/refresh my site will crash out and it replaces wp-weather with this:

    —-
    Warning: fsockopen() [function.fsockopen]: unable to connect to xoap.weather.com:80 (Connection timed out) in /home/SITENAME/public_html/wp-includes/class-snoopy.php on line 1142
    alert(‘Could not connect to lookup host.’)
    —–

    Any ideas?

  8. Kevin

    I’ve installed this plugin on WP 2.7 and WP 2.8 and am not able to change the title of the widget – no matter what I put in the widget title area it always displays “The Weather” – any ideas of how I can get this to say something else?

  9. Kevin

    I’ve tried it on 3 WP installs – one totally fresh – installing plugin right after wordpress. This is the only widget it happens to.

  10. Windforce

    There is a bug in your code. When you use $query = “INSERT INTO $table_name VALUES (‘$xml_url’, ‘$xml’, ‘$datetime’)”;
    $result = $wpdb->query($query) or die(‘Invalid query: ‘ . mysql_error());
    to insert the weather data into mysql, you should notice that there may be “‘” in the $xml(on example is Xi’an, which is the city I am now at), so you should replace all “‘” in $xml with “\’”.

  11. Joe

    Hey Matt!

    Thanks!! The wp-weather is amazing.
    Can i make a question!? I hope so!!
    I’m using the wp-weather and I translate a few words. Just Hi, Lo, Feels Like… ok.. so, i wanna know if i can replace the date and the weather , translate monday, tuesday… cloudy…
    Thank you man!!
    Great job!!

1 ... 7 8 9 10 11 ... 15