What does this plugin do?
Use this plugin in your WordPress site to place a weather forecast for any US location in a Page, Post, or within a sidebar.
- Download and unarchive the plugin folder.
- Place the uncompressed weatherspider folder in your wp-content/plugins directory. You should end up with up wp-content/plugins/weatherspider/.
- On the Plugin page in your WordPress Administration area, activate the WeatherSpider plugin.
WeatherBug.com API Key
In order to use this plugin, you must first obtain an API key from WeatherBug.com.
- Go to: http://developer.weatherbug.com/
- Register for an account
- Apply for an API key (be sure to get the REST key – not the GEO key)
- Enter your API key in the field above and press the “Save Settings” button
Caching Weather Data
By default, the weather feed information for each zip code will be cached for 15 minutes. This prevents the widget from making uneccesary calls to WeatherBug.com for weather. You can turn caching off in the settings panel (though it is not recommended). You can also clear the cache manually by clicking the “Clear Cache” button.
Displaying in Pages and Posts
To display a weather forecast in a page or a post, you can use the [weatherspider] shortcode. The shortcode has four options, listed below.
- zip: The zip code of the location you want to show the forecasft for (default=90210).
- size:The size of the forecast display. Options are:
- sm: 3 Day forecast, 200px wide (default)
- med: 4 Day forecast, 250px wide
- lg: 5 Day forecast, 300px wide
- showCurrent: Show the current temperature in the display. Options are: true, false (default=true)
- showForecast: Show the forecast in the display. Options are: true, false (default=true)
[weatherspider zip=”02842″ size=”lg” showCurrent=”false” showForecast=”true”]
If your theme is widget-enabled, you can add the WeatherSpider widget to any sidebar. Configuration is self-explanatory. Note that you can add multiple instances of the widget in your sidebar.