Weather

This page showcases WordPress widgets that display weather information.  I tested a few plugins and found the following to be functional and easy(ish) to install and use.

Weather Atlas Widget

[shortcode-weather-atlas city_selector=1632056 layout=”horizontal” unit_c_f=”c” background_color=#1e73be sunrise_sunset=1 hourly=5 daily=5]

 

Easy to install – took 5 minutes to setup

The Weather Atlas Widget was the first weather plugin I installed.  It was simple to install and required no API or external registration to get going – I had it working inside 5 minutes.  All settings for this widget appear only in the widget itself – there is no separate settings screen that I usually expect for WordPress plugins.

Displays lots of good information

This widget displays all the information I wanted, plus a few things I hadn’t thought of like sunrise / sunset.  The default orange background is hard to miss – I usually change it to a blue background (if you set it up as a widget rather than use a shortcode, you have to save the widget first, then also change layout before you can save a new colour).

Widget refreshes quickly and doesn’t slow the page load

Another thing I like about this plugin is that the weather information is stored in the database and refreshed in background.  This means that the plugin displays quickly because it’s not waiting to retrieve the weather information from an Internet source when it renders the page.  The difference is noticeable when you refresh pages with other weather widgets and you can see the delay before the widget displays.

Use shortcodes to setup multiple widgets

[shortcode-weather-atlas city_selector=1632053 layout=”vertical” unit_c_f=”c” background_color=”” sunrise_sunset=1 current=0 hourly=0 daily=0 style=”float:right;width:200px”]

You can create multiple widgets with different layouts and colours – you could use a widget with a horizontal layout on a post page and another widget with vertical layout in the sidebar.  Documentation for this plugin takes a bit of reading to find – shortcodes for Weather Atlas widget can be found here.

Note!  If you copy and paste examples of shortcodes from the above website, you should delete and retype the quotation marks.  It took me 10 minutes or so to realise that my shortcodes weren’t working because the quotations used in the example code were not accepted by the plugin.

Pros and Cons of Weather Atlas Widget

This widget was quick to setup and required no registration with a weather provider.  All settings for the widget are stored in the widget configuration itself or in the shortcode options if you’re using it in a page.

I like most aspects of the presentation of this widget including the information you can display (or not) and how easy it is to use.  It’d be nice if it showed a background image based on weather conditions, like other plugins do. It’s already easy to find the temperature but a good background image would show at a glance whether it’s looking like flood, drought or locusts.  It’s a minor complaint, the “conditions” image also gives this information.

Documentation is not easy to find on the plugin page – I actually got most of the shortcode options by clicking on the shortcode – all options link under City in the widget itself.  Also, the examples for shortcodes that are on the plugin page don’t work as expected because the plain quotation marks on the page seem to be converted by WordPress into left and right double quotation marks – which are not accepted by the plugin.  So if you do copy any shortcode examples from the plugin page’s FAQ section, or anywhere for that matter; best to delete and replace the quotation marks.

I originally thought that the user could select location with this plugin, but I couldn’t find it when I was writing this post.  Maybe I got it mixed up with another plugin.  If the user can’t select the location in the widget, then that would not be so great.

 

Awesome Weather Widget

[awesome-weather owm_city_id=”2192362″ size=”wide” units=”auto” forecast_days=”5″ background_by_weather=”1″ allow_user_to_change=”1″]

 

Need to register for this plugin to work

The Awesome Weather Widget was not so intuitive to install and is not clear about what API keys are necessary to get it going.  At minimum, you require an API key from OpenWeatherMap or Dark Sky (weather providers) – registration at OpenWeatherMap took me about 10 minutes. You get an API key after you confirm your email address, then you input this into the settings page for Awesome Weather Widget (under WordPress \ Settings).

You can optionally add a google API key for maps, I think – I didn’t use this.

Overall it took me maybe half an hour to setup this plugin, including registration with OpenWeatherMap but not with Google.

Multiple instances of the plugin

Using shortcodes, you can also configure multiple instances of this plugin to work with different locations.  This plugin has more documented options than does Weather Atlas which made it easy to create a very basic widget with minimal information.

Changing the location on one widget though, seems to change the other widgets to the same location.  I couldn’t find a way around this.  I also found that I had to sometimes reset my browser cache to some changes I’d made to widgets.

Standard Widget

[awesome-weather owm_city_id=”2179537″ size=”wide” units=”auto” forecast_days=”4″ background_by_weather=”1″ allow_user_to_change=”1″]

 

Basic Widget

This widget is set to “micro” size with inline styling to reduce the width of the widget to less than the frame / page width.

[awesome-weather owm_city_id=”2193732″ size=”micro” units=”auto” hide_stats=”” forecast_days=”0″ background_by_weather=”1″ allow_user_to_change=”0″ inline_style=”width:250px;height:350px”]

 

Pros and Cons of Awesome Weather Widget

I like that this widget is pretty to look at and very configurable with shortcodes.

Not so good is the time to set it up if you’re not familiar with it or don’t already have API(s) setup with openweather.org or darksky.

When selecting locations, you simply click on the location icon, type the name of your location and press enter.  The widget quickly refreshes data for the new location and updates the location name to the one you’ve typed in, but with no country or region displayed.

Unfortunately, the widget doesn’t show you options when you’re typing in a location so if you’re selecting a name that could exist in multiple locations, such as Christchurch (NZ or UK) or Salem (name place in at least 20 places in different countries) you don’t get the option to select between them.  And because you can’t see the region or country displayed in the widget, you don’t know which location the widget actually selected.

Also related to location, I found that when I manually changed location on one widget, the other widgets sometimes also changed to that location after the next page refresh.  To get all widgets back to their original settings, I’d have to both clear the browser cache and also clear the widget caches in the WordPress admin area.  Since clearing the widget caches as an admin was definitely necessary sometimes, I don’t know how keen I would be to use this plugin to display multiple widgets for different locations, unless the user ability to change location was disabled.