Weather Widget 2 is a simple widget for displaying weather conditions and forecast for places across the world.
- jQuery driven
- uses AJAX technology
- Search Bar with auto complete function
- Ability to set default location
- Ability to auto detect user location using HostIP service or its own integrated geoip database.
- 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
- 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.
::NOTE:: Since the widget is big in size, method 1 could fail if you have upload limit.
Method 2) ( If Method 1 fails )
- Navigate to <Your WordPress Folder> / wp-content / plugins /
- Extract the content of “jb-weather-widget-2.zip” archive to the “plugins” folder. It should look like this: <Your WordPress Folder> / wp-content / plugins / jb-weather-widget-2 /
- Activate the J.B.Market Weather Widget plugin from your WordPress Admin Panel.
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 http://www.worldweatheronline.com/register.aspx
- 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).
- 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" autodetect="1" geonames="MY-GEONAMES-USERNAME" 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 (optional)
- 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.