WFY24 Weather Widget – Forecast & Air Quality
WFY24 Weather Widget – Forecast & Air Quality

WFY24 Weather Widget – Forecast & Air Quality

5/5 (1 ratings) 60 active installs Updated Nov 13, 2026
The settings screen after activation — widget preview and the activation status

The settings screen after activation — widget preview and the activation status

WFY24 Weather Widget puts a weather card from wfy24.com on any post, page or sidebar: with the WFY24 Weather Widget block, the [wfy24_weather] shortcode, or the one-click quick actions on the settings screen.

There is no API key to sign up for and nothing to copy and paste. The activation button registers your site with wfy24.com and stores the widget key for you.

What your visitors see

  • Current weather — temperature, feels-like, the day’s high and low, humidity and wind, with a condition icon.
  • A five-day forecast — daily highs, lows and conditions (Classic and Forecast layouts).
  • A seven-day outlook — one row a day with the condition, the low and high and, when there is one, the chance of rain (Week layout).
  • A country map — the temperature now in a country’s largest towns, on its map, with the official warning in force where its issuer allows other sites to show it (Country map layout). Pick the country, or let it follow the city or the visitor.
  • Air quality — the air quality index on the place’s own national scale (US EPA, India’s CPCB, China’s HJ 633, the European index elsewhere) and four pollutants: PM2.5, PM10, O₃ and NO₂. Air quality data comes from the Copernicus Atmosphere Monitoring Service (CAMS).
  • Nine layouts — Classic, Compact, Minimal, Badge, Forecast, Air quality (card), Air quality + weather (wide), Country map and Week (7 days).
  • 52 languages, right-to-left included (Arabic, Hebrew, Persian, Urdu). The widget starts in your site language; change it for the whole site in Settings WFY24 Weather, or for any one widget.
  • Your city or theirs — pin a city, or leave it empty and each visitor sees their approximate location, worked out by wfy24.com from the IP address of the request, without a browser prompt. Precise location (with the visitor’s permission) is an opt-in setting.
  • Light, dark or auto — Auto picks light or dark to match the background of the page the widget sits on.
  • Always current — the weather is fetched in the visitor’s browser and refreshed every 10 minutes while the page is open in a visible tab, so cached pages never show yesterday’s weather.

Built to stay out of your way

  • One script, loaded asynchronously in the footer, and only on pages that show a widget. Pages without a widget load nothing from wfy24.com.
  • No layout jump — the widget’s height is reserved before it loads, so the content below it stays put.
  • Shadow DOM — the card is drawn in its own Shadow DOM, so your theme’s CSS does not restyle it.
  • No cookies — the widget sets none and stores nothing in the visitor’s browser.
  • Structured data — a short Schema.org description beside each widget tells search engines what it shows and for which place (optional and off by default: tick «SEO structured data» under Settings WFY24 Weather Advanced).
  • Admin screen in 16 locales — Bulgarian, Czech, Dutch, French, German (de_DE / de_DE_formal / de_AT / de_CH), Greek, Hungarian, Italian, Polish, Portuguese (pt_PT / pt_BR), Spanish and Swedish, the block editor included.

Where the forecast comes from

The forecast is wfy24.com’s and is based on numerical weather models: DWD ICON (ICON-D2 over central Europe, ICON-EU over Europe, ICON global elsewhere), ECMWF and NOAA GFS. The Classic, Forecast, Week and Country map layouts name the models in their footer. The Country map’s region boundaries come from OpenStreetMap data, credited on the map.

Usage

Shortcode, with the defaults from Settings WFY24 Weather:

[wfy24_weather]

Override them for one widget:

[wfy24_weather city="paris-fr17807753" theme="dark" variant="forecast" lang="fr"]

[wfy24_weather variant="country" country="GR"] shows the Country map of Greece.

Attributes: city (a wfy24.com city slug), variant (classic, compact, minimal, badge, forecast, aqi, aqi-wide, country, week), country (the Country map’s two-letter country code, e.g. GR; without it, the country of the city, else the visitor’s — the settings screen and the block list the countries by name), theme (auto, light, dark), units (metric, imperial), lang (any of the 52 codes, optionally with a region such as pt-BR), width (400, 400px, 80%) and geolocation (on asks the visitor’s browser for the precise location).

Or add the WFY24 Weather Widget block (Widgets category). Its settings start on «Site default» and follow Settings WFY24 Weather until you change them; the editor shows the chosen layout with sample weather.

Attribution

Every widget shows one small credit link, «wfy24.com». It opens the wfy24.com forecast page of the place the widget shows, in a new tab; the place name in the widget links to the same page. On the Country map the credit opens the country’s page, the title and each town link to their pages on wfy24.com, and the map credit «© OpenStreetMap» links to OpenStreetMap’s copyright page. The activation screen mentions the credit link above the «Activate now (free)» button.

External services

This plugin works with the WFY24 weather service at https://www.wfy24.com. Requests from your server carry a User-Agent with the plugin’s name and version and your site’s address.

  • Activation — only when you click «Activate now (free)»: a POST to /api/widget/register-from-plugin with the email address you confirmed in the form, your site’s domain and name, the WordPress and plugin versions and the site language. wfy24.com answers with the widget key, which the plugin stores. If wfy24.com already has a widget for that email and domain, it answers with the first characters of that key and a link to request a replacement, and the plugin shows the «Connect an existing WFY24 widget» form. Pasting a key into that form sends nothing.
  • City search — while you type in a Default city field: your server sends the text you typed to /api/places/search (through the plugin’s admin-only route /wp-json/wfy24/v1/cities, so your browser never calls wfy24.com directly). Answers are cached for 5 minutes.
  • Place names for the structured data — when you save a default city in the settings; while «SEO structured data» is ticked, when you save a post, a page or a widget area that names a city; and when you open Settings WFY24 Weather while a city your site shows has not been looked up yet: your server asks /api/places/by-slug/{slug} (and, if that fails, /api/places/search with the city’s name) for the place’s names. Only the city slug or name is sent. The answers are stored in your database (option wfy24_places) and pages are rendered from them; a visitor’s page view never waits for wfy24.com. The default city is looked up while the structured data is off too, so that the settings screen can say when wfy24.com does not know its slug. Nothing is looked up before the site is activated, and after a lookup that could not reach wfy24.com none is tried for an hour.
  • The widget itself — in your visitors’ browsers, on pages that show a widget: the browser loads https://www.wfy24.com/widget.js and requests the weather from /api/widget/data with the widget key, the city, the language and the units (the Week layout asks for seven days). Without a city, wfy24.com locates the visitor approximately from the IP address of the request (/api/widget/ip-location, or the data request itself). The air quality layouts also call /api/air-quality/current. The Country map requests /api/widget/country instead, with the widget key, the country (or, without one, the city) and the language; with neither, wfy24.com finds the visitor’s country from the IP address of the request, and the layout never asks the browser for a position. With «Auto-detect visitor location» on, the browser asks the visitor first and, if they agree, sends their latitude and longitude. The widget refreshes every 10 minutes while the page is visible.
  • Previews — in your own browser, once the site is activated, on the settings screen and in the block editor while it shows a WFY24 Weather Widget block: the browser loads https://www.wfy24.com/widget.js into a sandboxed frame, which draws the chosen layout with built-in sample weather. The frame sends no widget key and no Referer, and makes no weather request. The admin page (the settings screen or the editor) tells the frame which width to draw and the frame answers with the widget’s size; neither leaves your browser. Before activation the block shows a note instead and loads nothing from wfy24.com. A WFY24 Weather Widget block in a widget area (Appearance Widgets, the Customizer) previews the same way; the «Add to sidebar» text widget shows a note in its preview and loads nothing from wfy24.com.

wfy24.com is served through Cloudflare. Like any web server it keeps access logs of these requests — the visitor’s IP address, the address of the page that shows the widget (Referer), the browser’s User-Agent and the request with the widget key shortened — currently for about 52 days, for security, rate limiting and abuse prevention. The plugin runs no scheduled tasks and sends no telemetry.

Multisite Support

The plugin works on Multisite. All settings (key, defaults, the created page) are stored per subsite, so each subsite runs independently.

  • Network activation does not contact wfy24.com. It only loads the plugin on every subsite: no email is sent, no key is created.
  • Each subsite admin activates individually. On a subsite, Settings WFY24 Weather «Activate now (free)» sends that subsite’s domain and the email confirmed in the form, after showing exactly what will be sent. Nothing is sent for a subsite until its admin uses that screen (a city search or the Activate button).
  • Keys are domain-bound. A key issued for site-a.example.com does not work on site-b.example.com, so subdomain and domain-mapped networks get one key per subsite.
  • Sub-directory installs share one host. On example.com/site-a, example.com/site-b … every subsite reports the same domain, example.com. Activate the main site normally; on each further subsite open Connect an existing WFY24 widget and paste the main site’s key (the main site shows it under Settings WFY24 Weather Advanced). A second «Activate» with the same email on the same host is answered with «already registered» and the connect form, not a second key.
  • There is no network-wide settings screen; each subsite has its own.