Weather Widget 2 is a simple widget for displaying weather conditions and forecast for places across the world.
- Search location weather by US, UK, Canada Postalcode, Latitude/Longitude and city name
- Geocode auto-complete list for cities and countries
- Ability to set default location
- Ability to auto detect user location using HTML5 Geolocation
- Celsius or Fahrenheit units
- Kilometers or Miles units
- Displays today’s date, temperature, wind direction and speed, forecast for next 4 days
- Color adjustable
- Adjustable Width (Note: minimum of 280 pixels)
- Has its own unique icons
- jQuery, AJAX, cURL, Cache
- Go to your WordPress admin panel and navigate to Plugins -> Add New.
- click “Upload” and then “Browse”.
- Select the archive “jb-weather-widget-2.zip” and click “Install Now”.
- Activate the J.B.Market Weather Widget plugin by clicking “Activate” button.
Set up :
- Go to your WordPress admin panel and navigate to Appearance -> Widgets.
- From “Available Widgets” box click and drag “J.B.Weather Widget” to the desired sidebar (at the right).
- Set desired parameters and click Save.
Obtaining API Key
To obtain free API key, go to https://developer.forecast.io/register
Note:The Weather API is free of charge and does not require subscription.
Obtaining Geonames Username
- forecast.io API key (you can obtain one for free at https://developer.forecast.io/register)
- geonames.org username (you can obtain one for free at http://www.geonames.org/login)
- PHP cURL enabled or file_get_contents.
- PHP server is not blocking access to external sources (The Weather API in this case).
- PHP server has read/write permission to store the cache files in the widget folder (mkdir and file_put_contents).
Stay up to date!
Follow us on Facebook or Twitter and get latest news about item updates and upcoming plugins and scripts!
You can also follow us on Instagram and soon on YouTube with video
tutorials on how to install our plugins and scripts!
- 30 Apr 2016
- Bug fixes where widget sometimes fail to return weather data.
- 06 Apr 2016 Version 2.5
- Weather API has been changed to forecast.io since the old one became paid for new users.
- 27 Aug 2015
- The autocomplete list of cities and countries has been reactivated. The feature requires active www.geonames.org/ username. You can obtain one by registering at http://www.geonames.org/login
- Added shortcode
- Shortcode example:
[jbww apikey="MY-API-KEY" location="London, England" geonames="MY-GEONAMES-USERNAME" autodetect="0" basiccolor="#000" width=280, degreesunits="C", windunits="K" curl="1"]
- Shortcode parameters:
- apikey – Your worldweatheronline.com api key (required)
- location – Location name, ip address, post code, long lat etc…
- autodetect – Auto-detect user location 0 – Off 1 – On
- geonames – Your active http://www.geonames.org username
- width – Plugin width (units are in pixels)
- degreesunits – Temperature units C or F
- windunits – Wind units K or M
- curl – Use cURL 0 – Off 1 – On
- 06 Feb 2013
- Fixed bug where the plugin could break some themes
- Added option for translation. To translate the days from English edit file language.txt found in the widget folder.
- HostIP detection type will properly use cURL now if cURL option is selected.
- Other minor bug fixes.
- 28 March 2013
- API url has been updated.
- The widget will make 3 attempts per 3 seconds to get data on ajax error.
- If APi return no data, the xml content will be dumped for debugging.
NOTE:: You may need to obtain new API key if you already have one.