Easily embed the windy.com widget as a native WordPress widget or shortcode.
This plugin 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.
The shortcode takes seven attributes. You can simply use
[weather-map] and it will work, but you will most likely want to customise the remaining attributes yourself. An example of a fully filled-out shortcode would be
[weather-map width="100%" height="350px" lat="53.199" lon="-7.603" zoom="4" layer="temp" scale="C"].
The attributes can be set as follows:
widthattribute accepts any valid CSS property for width.
heightattribute accepts any valid CSS property for height.
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, radar, rain, temp and wind.
scaleattribute accepts either “C” or “F”, defining Celsius and Fahrenheit respectively.
Note that in the case of an invalid value, a default value will be used instead.
Why not just embed the iframe directly from 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: