Easy Weather Widget


Easy Weather Widget provides you with an easy to use widget which outputs weather information. When creating the widget just enter in your U.S. zip code and save, it will display the current weather on your site.

I completely rewrote the widget and made it filterable. You need to obtain and enter an API key, which has a free tier that should cover many use cases to obtain at Settings > General in your WP backend. See http://openweathermap.org/api for more information.

The following filters are available:

eww_template to override the output template for the widget, see below for more information.

note, if you are overriding the template, please heed the notice to comply with the OpneWeatherMap license which states the OpenWeatherMap name must be mentioned as a weather source in a visible part of the application. (obtained 8/2016 from http://openweathermap.org/price)

eww_ioc_container to override the IoC container if you want to use different classes in the application (including the API to grab weather data)

Usage of eww_template filter

Add a “views” directory and file named “custom-eww.php” to your template directory. The “custom-eww.php” file will be your custom template for this example.

Example of using a custom template from within your theme PHP 5.3+ which allows closures


        add_filter( 'eww_template', function ( $template ){
            $template_dir = get_template_directory();
            return $template_dir . '/views/custom-eww.php';
        } );


This plugin takes advantage of Grunt for validating JavaScript, SASS compilation and minification. To take advantage of Grunt you have to have both npm and Grunt installed. Visit the respective sites for the applications and make sure they are installed. Once installed, if you want to edit/fork this plugin, it will be helpful to be familiar with these two tools.


  1. If installing manually, unzip and copy the resulting directory to your plugin directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Add the “Easy Weather Widget” widget to any widgetized area/sidebar and configure as desired.


Does this work outside of the United States?

Current version uses OpenWeathermap.org’s API and it works in the US and Canada

Contributors & Developers

“Easy Weather Widget” is open source software. The following people have contributed to this plugin.


Translate “Easy Weather Widget” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Fix for missing wi-day-partly-cloudy class (changed to wi-day-cloudy)


  • Add translation domain


  • Fix translation issue
  • Clean up the widget’s markup
  • Adapt the SCSS to be more BEM like
  • Fix some issues where we were not implementing interfaces properly


  • Adding more information to help show users how to obtain an API
  • Refactor IoC container for cache
  • Add filter to hook into IoC container


  • Internal efficiency updates
  • Fix bugs for unset widgets throwing warnings


  • Breaking changes, rewrote from the ground up!


  • Added ability to have multiple instances of the widget on a single page

  • Fix for malformed markup in the admin


  • Made plugin translatable


  • CSS bugfix


  • Bugfix causing classes not to be loaded properly


  • Fix to enable caching


  • Rewrote widget
  • Ability to change the title of the widget
  • Ability to set the temperature scale (Fahrenheit, Celsius or Kelvin)


  • Initial Release