Plugin Directory

Weather Forecast - WP Wunderground

Get accurate and beautiful weather forecasts powered by Wunderground.com for your content or your sidebar.

How do I use my own icons?

If you want to use your own icons, you would add a filter to the bottom of your theme's functions.php file:

Version 1.2+

add_filter('wp_wunderground_forecast_icon', 'use_custom_wunderground_icons');

function use_custom_wunderground_icons($content=null) { 
    
    $myIconFolder = 'http://www.example.com/images/';
    
    $myFileType = '.gif';
    
    $content = preg_replace('/http\:\/\/icons\-ecast\.wxug\.com\/i\/c\/[a-z]\/(.*?)\.gif/ism', $myIconFolder.'$1'.$myFileType, $content);
    
    return $content;
}

Version 1.1

add_filter('wp_wunderground_forecast', 'use_custom_wunderground_icons');

function use_custom_wunderground_icons($content=null) { 
    
    $myIconFolder = 'http://www.example.com/images/';
    
    $myFileType = '.gif';
    
    $content = preg_replace('/http\:\/\/icons\-ecast\.wxug\.com\/i\/c\/[a-z]\/(.*?)\.gif/ism', $myIconFolder.'$1'.$myFileType, $content);
    
    return $content;
}

I am unable to activate the plugin.

This plugin requires PHP5, and Version 1.0 does not check for PHP compatibility. In future versions, it will show a more meaningful error and also support PHP 4.

For now, however, options are to upgrade the version of PHP (contact your web host) or to not use the plugin.

I want to modify the forecast output. How do I do that?

function replace_weather($content) {
    $content = str_replace('Rain', 'RAYNNNNN!', $content);
    $content = str_replace('Snow', 'SNNNOOOO!', $content);
    return $content;
}
add_filter('wp_wunderground_forecast', 'replace_weather');

What is the plugin license?

  • This plugin is released under a GPL license.

Do I need a Wunderground account?

Nope, no account needed.

This plugin slows down my site.

Version 1.1 of the plugin added forecast caching, so the forecast is only re-loaded every 6 hours.

For previous versions, it is recommended to use a caching plugin (such as WP Super Cache) with this plugin; that way the forecast isn't re-loaded every page load.

Requires: 2.8 or higher
Compatible up to: 3.3.2
Last Updated: 2012-3-29
Downloads: 31,773

Average Rating

4 stars
(28 ratings)

Support

0 of 0 support threads in the last three weeks have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

3 people say it works.
0 people say it's broken.

75,4,3 100,2,2 100,1,1
100,1,1
100,1,1 100,1,1 100,1,1
0,2,0 100,1,1
33,3,1 86,7,6
100,1,1
100,2,2
100,2,2
88,8,7
60,5,3 100,2,2
100,3,3