Ventus allows you to easily embed the windy.com widget on your website, in the form of a native WordPress widget (accessible from Appearance > Widgets) or as a simple shortcode.
It is a lightweight plugin built using an object-oriented approach, and follows WordPress Coding Standards.
- Set the overlay to either clouds, CO concentration, currents, radar/lightning, rain, sea temperature, snow cover, standard temperature, waves, wind or wind gusts.
- Use either Celsius or Fahrenheit as the temperature scale.
- Set the width, height and border-radius using responsive (%) and/or fixed (px) values.
- Manually define longitude and latitude for precise location coordinates.
- Select the altitude from surface up to 13.5km (effective only when layer is set to wind or temperature).
- Choose from 8 levels of zoom (min. 3, max. 11).
- Show or hide pressure isolines, the map marker and spot forecast.
- Choose from the following wind measurement units: beaufort (bft), kilometers per hour (km/h), knots (kt), meters per second (m/s) and miles per hour (mph).
- Choose from the following forecast models: ECMWF, ICON, ICON-EU, GFS and NEMS.
- Set the forecast time from now to 12 or 24 hours ahead.
The shortcode accepts up to 16 attributes. You can simply use
[ventus] and it will work (or the old shortcode
[weather-map] which will continue to work), but you will most likely want to customise the remaining attributes yourself.
An example of a fully filled-out shortcode would be:
[ventus width="100%" height="350px" radius="20px" loading="lazy" lat="53.199" lon="-7.603" zoom="4" layer="wind" level="surface" scale="C" units="knots" pressure="true" marker="true" model="ecmwf" forecast="true" time="12"]
The attributes can be set as follows:
widthattribute accepts any valid CSS property for width.
heightattribute accepts any valid CSS property for height.
radiusattribute accepts any valid CSS property for border-radius.
loadingattribute accepts either lazy or eager. The default is lazy loading.
latattribute must contain a string of digits to three decimal places, in the range of -90 to +90 (e.g. “53.199”).
lonattribute must also contain a string of digits to three decimal places, in the range of -180 to +180 (e.g. “-120.894”).
zoomattribute must contain a number between 3 and 11 (inclusive).
layerattribute accepts the following values: clouds, cosc (CO concentration), currents, gust, radar, rain, snowcover, sst (sea temperature), temp (standard temperature), waves and wind.
levelattribute (only effective when the layer is wind or temp) accepts the following values: surface, 100m, 950h (600m), 925h (750m), 900h (900m), 850h (1500m), 800h (2000m), 700h (3000m), 600h (4200m), 500h (5500m), 400h (7000m), 300h (9000m), 250h (10000m), 200h (11700m) and 150h (13500m).
scaleattribute accepts either “C” or “F”, defining Celsius and Fahrenheit respectively.
unitsattribute accepts the following values: bft (beaufort), km/h (kilometers per hour), kt (knots), m/s (meters per second) and mph (miles per hour).
pressureattribute can be set to true to display pressure isolines, otherwise the isolines will remain hidden.
markerattribute can also be set to true, otherwise it will remain hidden.
forecastattribute can be set to true to display the spot forecast, otherwise it will remain hidden.
timeattribute accepts the following values: now (the default), 12 (12 hours from now) and 24 (24 hours from now).
modelattribute accepts the following values: ecmwf, icon, iconEu, gfs and nems.
Note that in the case of an invalid value, a default value will be used instead.
- No special set-up required – just click install and activate, and you’re good to go!
- If you manually download the plugin, just unzip to the WordPress plugins folder and the plugin will be automatically detected. It can then be activated as normal.
Why is the map showing the wrong location?
This can happen sometimes with the shortcode if you wrap the longitude or latitude attributes in the wrong kind of quote marks.
Mark sure you are using
" "rather than
” ”, e.g.
How do I set the latitude and longitude?
The easiest (and recommended) way to do this is to go straight to windy.com. Once there, take note of the URL. It will contain the latitude and longitude in its parameters, and if you zoom in, it will also contain the zoom level. For example, the sample parameters I use as defaults are: latitude 53.199, longitude -7.603, and a zoom level of 5. These would show in the URL in the following format: windy.com/?53.199,-7.603,5.
Why not just embed the iframe directly from [windy.com](https://www.windy.com) instead of using this plugin?
If you’d prefer to do this, that’s great – no problem! However, this plugin was created to make the iframe that windy.com kindly provide even more useful. To that end, it offers the following advantages:
- While an iframe can be inserted directly into a page or post, you can’t insert an iframe directly into the WordPress widgets area (which is how most themes allow you to set the content for site sidebars and footers etc). This plugin allows you to do precisely that.
- And even in the case of an iframe inserted into a page or post, the generated code can often confuse people who don’t have any technical/programming experience. The shortcode provided by this plugin simplifies this considerably, making it readable and easy to customise by anyone.
- You can change the default overlay from wind to either clouds, CO concentration, sea temperature, snow cover, standard temperature, radar/lightning, rain, or waves.
- Width and height can be set to responsive (percentage-based) as well as fixed (pixel-based) values.
Colaboradores y desarrolladores
“Ventus – Weather Map Widget & Shortcode” es un software de código abierto. Las siguientes personas han colaborado con este plugin.Colaboradores
Traduce “Ventus – Weather Map Widget & Shortcode” a tu idioma.
¿Interesado en el desarrollo?
Revisa el código , echa un vistazo al repositorio SVN , o suscríbete al log de desarrollo por RSS .
Registro de cambios
- Added feature to select different altitude levels (from the surface up to 13.5km).
- Added feature to choose between different forecast models (ecmwf, gfs, iconEu, icon, nems).
- New layer/overlay types: currents and wind gusts.
- Adjustments to widget layout.
- Added Italian translation.
Shout out to Marco Simonetti for the assist!
- Added lazy loading option for better performance.
- Improved accessibility with unique title attribute.
- Updated FAQs and tested with latest WordPress version.
- Removed unnecessary scss dependency.
- Added feature to define border-radius (rounded corners).
- Added feature for the spot forecast time (from now, 12 hours from now, or 24 hours from now).
- Updated widget UI to use less space.
- Updated the FAQ section.
- Updated existing translations.
- Added Turkish translation (thanks for tansi for the assistance!).
- Added Spot Forecast feature.
- Added Brazilian Portuguese translation.
- Re-named plugin from ‘Weather Map Widget’ to ‘Ventus – Weather Map Widget & Shortcode’.
- Added new shortcode alias
[ventus](the old shortcode
[weather-map]has been maintained for backwards-compatibility).
- Added four new layers to select from: CO Concentration (cosc), Sea Temperature (sst), Snow Cover (snowcover) and Waves (waves).
- Added general translation support and a French translation.
- Added ability to choose from the following wind measurement units: beaufort (bft), kilometers per hour (km/h), knots (kt), meters per second (m/s) and miles per hour (mph).
- Added ability to show/hide the map marker.
- Added ability to show/hide to show hide pressure isolines.
- Re-factored code (classes, package names, text domain etc) to reflect new plugin name.
- Fixed issue with zoom levels when using shortcode.
- Initial release.