Description
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-pluginwith 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/searchwith the city’s name) for the place’s names. Only the city slug or name is sent. The answers are stored in your database (optionwfy24_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.jsand requests the weather from/api/widget/datawith 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/countryinstead, 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.jsinto 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.
- WFY24 Terms of Service: https://www.wfy24.com/en/terms
- WFY24 Privacy Policy: https://www.wfy24.com/en/privacy-policy
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.comdoes not work onsite-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.
Installation
- Install the plugin from Plugins → Add New (search for «WFY24»), or upload it to
/wp-content/plugins/wfy24-weather-widget/. - Activate it. Settings → WFY24 Weather opens.
- Check the pre-filled email and your defaults (city, language, theme, units) and click Activate now (free). The widget is live: use the quick actions (Create Weather page, Add to sidebar), the block, or
[wfy24_weather]anywhere.
Already have a key (an earlier install of this plugin, the wfy24.com widget builder, or the main site of a sub-directory Multisite)?
- Go to Settings → WFY24 Weather.
- Open Connect an existing WFY24 widget and paste the key (it looks like
wfy24_followed by 32 letters and digits). A value of any other shape is rejected and nothing is changed. - Add the block or
[wfy24_weather]to any post, page or widget area.
FAQ
Is it really free?
Yes. No credit card, no trial, no paid plan and no ads in the widget. Fair-use rate limits apply; they are generous for normal sites.
Do I need an API key?
The widget uses one, but you do not have to get it: you sign up nowhere, and the activation button registers your site with wfy24.com and stores the widget key for you. If you already have a key — from an earlier install, from the wfy24.com widget builder or from another subsite — paste it into Connect an existing WFY24 widget on the same screen.
Can I revoke or change my key later?
Yes — visit wfy24.com/en/widgets to manage keys (the «Lost it? request a replacement» link on the activation screen takes you to the same place). Paste a replacement key issued there into this plugin: on a site that already has a key, into the API key field under Settings → WFY24 Weather → Advanced, then «Save changes»; on a site without one, into Connect an existing WFY24 widget. The old key stops working within about 30 minutes.
What data is sent to wfy24.com?
See «External services» above. The plugin’s own requests happen only when you activate, search for a city, save a default city, save a post, page or widget area that names a city while «SEO structured data» is ticked, or open its settings screen while a city’s name is still missing (to look up the place’s name). Visitors’ browsers load the widget from wfy24.com on pages that show one. In the admin, once the site is activated, the settings screen and the block editor load widget.js into a sandboxed frame for their previews, which use sample weather: no key, no weather request.
Does it slow my site down?
It adds one script, loaded asynchronously in the footer of pages that show a widget; pages without a widget load nothing from wfy24.com. The space for the widget is reserved before it loads, so the page does not jump.
Can I customize the look?
Choose from 9 layouts (Classic, Compact, Minimal, Badge, Forecast, Air quality, Air quality + weather wide, Country map, Week), 3 themes (Auto, Light, Dark), metric or imperial units and a width. The card is drawn in a Shadow DOM, so your theme’s CSS does not change it.
What languages are supported?
- The widget starts in your WordPress site language as it is when you activate the plugin, and keeps it: if you change the site language later, change the widget’s too in Settings → WFY24 Weather. Set the
langattribute on a shortcode, or the Language setting of a block, to use another for one widget.
How do I find a city slug?
Easiest: pick the city in Settings → WFY24 Weather, which stores the slug for you. Or search for the city on wfy24.com and copy the last part of its forecast page address: www.wfy24.com/en/weather/paris-fr17807753 → paris-fr17807753.
Does it work with caching plugins?
Yes. The weather is fetched in the visitor’s browser, so a cached page still shows the current forecast.
Does it work with the block editor?
Yes — the «WFY24 Weather Widget» block, in the Widgets category. Once the site is activated, the editor shows the chosen layout with sample weather; the published page shows the live forecast.
Is there a «powered by» link?
One small link with the text wfy24.com in each widget; see «Attribution» above.
Where do I get help?
In the plugin’s support forum on WordPress.org. The settings screen and the plugin’s row on the Plugins screen link to it («Help & support»).
Screenshots
Changelog
2.7.0
- Pick the Country map’s country by name. The Country field on the settings screen and in the block is a searchable list of the 199 countries and territories the map can draw, named in your admin language; typing a two-letter code still finds the country. The shortcode’s
countryattribute is unchanged. - Set the width on the preview. A slider with a number box, in pixels or percent, on the settings screen’s preview, which resizes as you slide and prints the size the widget is drawn at; «Automatic» leaves each layout at its own width. The block has the same control.
- A percentage width is taken once.
width="80%"drew the widget at 80% of 80% of its column; it is now 80%, as the preview shows — a page that uses a percentage below 100 gets a wider widget. Pixel widths are unchanged. - What is new. After the update the settings screen shows a short «What is new» card, on that screen only, until each admin dismisses it; uninstall removes that mark.
- Fixes: the long shortcode example on the settings screen wraps instead of being cut; the selects show their arrow and are as wide as the other fields; the block’s «Site default» options are short and the site’s value is printed below them.
2.6.0
- Two new layouts. 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; choose the country with the new
countryattribute (block and settings: «Country»), or let it follow the city or the visitor. Week (7 days): one row a day for the place. Their heights are reserved like every layout’s. - The block now works in the editor. It ships its asset file, so WordPress loads it after the editor’s own scripts (from 5.5 on it had failed to load and an inserted block showed as missing). Its settings start on «Site default» and follow Settings → WFY24 Weather; the language is a list of the 52; and the editor shows the chosen layout with sample weather.
- The admin screens run wfy24.com code only in a sandbox. The settings screen and the block editor, block widget areas and the Customizer included, draw their previews with widget.js in a sandboxed frame that cannot reach the admin page or its cookies, using sample weather; the «Add to sidebar» text widget shows a note in its preview instead. On your site’s public pages the widget runs as before.
- No layout jump. The placeholder reserves each layout’s height before widget.js draws it.
- Structured data is opt-in. The Schema.org description beside each widget is off on a new install; tick «SEO structured data» under Settings → WFY24 Weather → Advanced to print it. Updating turns it off once: earlier versions switched it on at activation without asking, so a site that updates stops printing the description from its first page load on 2.6.0. Tick the box again to keep it.
- Structured data names the place. City names and pages are looked up on wfy24.com when you save, by slug, and stored; visitors’ page loads never wait for wfy24.com. The descriptions now say what each layout shows.
- The Pro code is gone, with its hourly status check: there is no paid plan.
- Help & support — a link to the plugin’s WordPress.org support forum in the header of the settings screen and in the plugin’s row on the Plugins screen.
- One review request. A week after the site’s key was stored (for a site that already had one, a week after this update), the settings screen asks once for a review on WordPress.org, with a link to the reviews page; following that link or «Don’t ask again» ends it for good on that site. It shows on no other screen and never on your site’s pages.
- Translations complete. All 16 bundled admin locales cover every string of 2.6.0, the block editor’s included, and name WordPress’s menus and screens as WordPress itself does in each language. New: «Deutsch (Sie)» (de_DE_formal), which had stayed in English.
- Bosnian. The language list now matches the 52 languages the widget speaks: Bosanski (
bs) can be chosen in the settings, in the block and with thelangattribute, and a new install on a Bosnian site starts in Bosnian. A site that already stored a language keeps it; choose Bosnian under Settings → WFY24 Weather. - Fixes: the city search finds cities on sites with plain permalinks too; «Add to sidebar» is offered only when the theme has a widget area (on a block theme it had added a widget that no page showed); a replacement key can be pasted into the API key field under Advanced; «Activate now» on a page without a key opens the settings screen (it landed on a broken page); a width without a unit («400») no longer raises a PHP warning; WordPress locales such as nb_NO, nn_NO, arg and kab now pick the right widget language; a British, Brazilian or other regional site passes its region to the widget for date and number formats; a shortcode
keymust have the shape of a key; the bundled translations load on WordPress 6.3–6.7 too. - Uninstall removes the plugin’s transients and, if untouched, the Weather page (to the Trash) and the sidebar widget it created, on every site of a network.
- Requires WordPress 6.3 (the block’s render file and the async script loading need it) and PHP 7.4. Readme: every claim checked against what runs, and every request to wfy24.com documented.
2.5.0
- Connect an existing WFY24 widget. The activation screen gains a second form: paste a key you already have (from an earlier install of this plugin, from the wfy24.com widget builder, or from the main site of a sub-directory Multisite) and the dashboard opens at once. The key’s shape is checked in the browser and again before saving; a malformed value is rejected and nothing changes. “I have a key — enter manually” now opens this form instead of leaving the site.
- Re-activation no longer dead-ends. When wfy24.com already has a widget for this site and email, the plugin says so, shows the first characters of that key, opens the connect form and links to the replacement-key page — instead of printing “Could not activate”.
- Widget language follows your site. New installs and the activation form default to the WordPress site language (a German site gets a German widget) instead of English. Saved settings are untouched.
- Armenian. The language list now matches the 51 languages the widget speaks.
- No more “Enable location” box on a fresh install. With no default city and visitor geolocation off, the widget shows the weather for the visitor’s approximate (IP-based) location, without a browser prompt. Turn on “Auto-detect visitor location” only if you want the browser’s precise location with the visitor’s permission; set a default city to pin one place.
- Structured data names the place. The JSON-LD
nameanddescriptionwere meant to use the resolved place name (“Weather forecast for Paris”) instead of the city slug; the lookup never matched a slug, which 2.6.0 fixes. - Attribution stated on the activation screen again (it had dropped out of the unified screen in 2.0.0): the free widget shows a small wfy24.com link, and the screen says so above the Activate button.
- Activation is stricter about what it stores. An activation answer without a valid key is reported as an error and is never saved as an empty key.
- Readme: outdated descriptions and claims removed; screenshot captions match the images; sub-directory Multisite is documented.
2.4.0
- Admin interface in 15 locales. Adds Bulgarian, Czech, Dutch, French, Greek, Hungarian, Italian, Polish, Portuguese (European and Brazilian), Spanish and Swedish to the German set. Each one uses its own WordPress core admin vocabulary rather than a literal translation — Apparence → Widgets, Vzhled → Widgety, Външен вид → Джаджи — because that is what the person reading the screen already knows.
- Separate European and Brazilian Portuguese, for the same reason the German set is split three ways: WordPress does not fall back between regional variants, and definições/configurações, guardar/salvar and ecrã/tela are different words in exactly the vocabulary an admin screen uses.
- Tested up to WordPress 7.1.
2.3.0
- German admin interface — settings screen, setup wizard and all notices translated, with separate files for Germany (de_DE), Austria (de_AT) and Switzerland (de_CH). WordPress does not fall back from de_AT or de_CH to de_DE, so a site set to “Deutsch (Österreich)” or “Deutsch (Schweiz)” would otherwise have stayed in English; de_CH uses ss for the eszett throughout.
- Activation link now opens in your own language. The “activate” and “manage keys” buttons pointed at the English page for every site in every language; they now follow your WordPress admin language to the matching wfy24.com page, falling back to English for languages the widget does not speak.
- Translation template rebuilt from source: it covered 44 strings, 22 of which no longer existed in the plugin, against 98 strings actually in the code. Anyone translating from the old template was working from a file that was 22% complete and partly fictional.
2.2.0
- Completely redesigned widget: crisp SVG icons (no more emoji), condition-tinted accents, temperature range bars in the 5-day forecast, stat meters, and a refreshed light/dark look.
- Country names now localized in all 50 languages (was: always Greek).
- 5-day forecast (was 3), correct day/night icons worldwide, per-place local noon for daily icons.
- Full right-to-left layout for Arabic, Hebrew, Farsi and Urdu.
- Accessibility: reduced-motion support, screen-reader labels, WCAG AA contrast for text.
- Imperial mode now converts precipitation (in/h) as well.
- Faster and lighter on the host page: no more page-wide DOM observers, refreshes pause in background tabs, geolocation resolved once per page view.
- Block editor: width control now cache-busts correctly; admin live preview reflects width.
2.1.1
- Fixed: aqi-wide live preview crushed in the 360px sticky sidebar. When the saved/selected variant is
aqi-wide, the settings-page preview now breaks out of the right-hand sidebar and renders in a full-width row above the form, so the horizontal weather + AQI bar has room to show its actual layout. On the published page nothing changes — the variant has always rendered correctly when given content-width room.
2.1.0
- NEW: Wide AQI variant (weather + air quality side-by-side). A new
variant="aqi-wide"style places the location, current weather (icon, temperature, conditions, feels-like, daily high/low) on the left and a horizontal European-AQI bar (0–100+) with category label on the right. Designed for embeds that span the full content width, where the compact AQI card looks too narrow. - NEW: User-controlled width. All variants now accept a
widthattribute —[wfy24_weather variant="aqi-wide" width="800px"]orwidth="100%". Accepts400,400px,80%,100%; invalid values are dropped silently. Set a site-wide default in Settings → WFY24 Weather Widget → Default width or override per shortcode / Gutenberg block. Empty value keeps each variant’s built-in default. - Tested up to WordPress 7.0.
2.0.2
- Fixed: Badge variant truncated text mid-word. The badge layout has
overflow:hiddenandwhite-space:nowrap, but the segments inside didn’t carrydata-fit-priorityhints — so when the embed sat in a narrow column (e.g. the admin’s live-preview sidebar) the fit observer didn’t know which parts to hide and the “Powered by WFY24” link was clipped mid-letter. Now the powered-by link, the description, the “Feels like” segment, and their dividers each have priorities; the observer hides them cleanly in priority order until everything fits. - Fixed: “Add to sidebar” quick action shown for block-based themes. On themes like Twenty Twenty-Three that register no classic sidebars, the action would always end in “Could not auto-add to sidebar — please add the widget manually from Appearance → Widgets”. The button is now hidden on block-theme installs and replaced with a short note pointing to the Site Editor and the shortcode option.
- Requires PHP 8.1 (was 7.4). PHP 7.4 reached end-of-life in November 2022 and is no longer receiving security patches. 8.1 is the lowest version Plugin Check / WordPress.org still recommends.
2.0.1
- Fixed: AQI variant chips unreadable in dark theme. The pollutant chips (PM2.5, PM10, O₃, NO₂) were using a translucent overlay that resolved to near-invisible against the dark theme’s navy backdrop, leaving the value text floating on what looked like the bare widget bg. The chip background, text, and border now use solid theme-aware colors (slate-700 on navy in dark, white on pale-blue in light), and the chip text reads from a dedicated set of CSS variables that stay legible regardless of the cascade.
- Version bump also serves as a Cloudflare-cache buster — the
?ver=2.0.0query had been cached on the CDN with the original 2.0.0 bundle, so even after the widget.js fix landed on the origin, sites embedding the script kept loading the stale copy.?ver=2.0.1is a fresh cache key.
2.0.0
- NEW: Air Quality (AQI) widget variant. A new
variant="aqi"style renders European-AQI air quality for the configured city — the big AQI index number, category band (good through hazardous, color-coded per the EEA scale), and the four headline pollutants (PM2.5, PM10, O₃, NO₂). Data comes from the Copernicus Atmosphere Monitoring Service (CAMS) via wfy24.com. Pick it from the “Style variant” dropdown in settings, or set it inline with[wfy24_weather variant="aqi"]. - Premium admin redesign. The plugin’s two separate admin screens — the onboarding wizard and the settings page — have been merged into a single unified screen at Settings → WFY24 Weather Widget. New 2-column layout with a sticky live preview on the right plus inline quick actions (create Weather page, add to sidebar) so you never need to leave the page to set up an embed. The old
wfy24-welcomeURL still works — it now redirects to the unified screen. - Re-organized settings. Essentials (city, language, theme, units, style) are upfront; visitor location, SEO JSON-LD, and the API key sit in a collapsible Advanced panel.
- Embed snippet card with one-click copy-to-clipboard.
- Removed: multi-city (
cities="..."). The v1.7.x multi-city feature is removed in this major release — the implementation needed a dedicated admin picker UI to be discoverable, and the new unified layout focuses on the most common single-city flow. If you had multi-city enabled, your shortcodes withoutcities=now fall back to your Default City; explicit[wfy24_weather cities="..."]shortcodes will only render the first city. Thewfy24_default_citiesoption is preserved on update so no data is lost in case the feature returns later. widget.jsis unchanged, so every existing shortcode and Gutenberg block in published posts continues to render exactly as before.
Earlier versions
1.x (2026): the first releases — shortcode, block, settings page, activation without copy and paste, structured data and the city picker. Their notes are in the plugin’s SVN history.



