Where does the data come from?
From public APIs such as Open-Meteo, SMHI, Yr/MET Norway, MET Norway Nowcast, FMI (Finnish Meteorological Institute), OpenWeatherMap, and WeatherAPI.com. You choose providers under Settings → Spelhubben Weather or per block/shortcode/widget via the providers attribute.
Do I need an API key?
Usually no. Open-Meteo, SMHI, Yr/MET Norway, MET Norway Nowcast, and FMI do not require keys. OpenWeatherMap and WeatherAPI.com do require API keys, and for Yr/MET Norway it’s recommended to include contact info (email/URL) in Settings → Spelhubben Weather → Yr contact/UA so your User-Agent is compliant.
Block, shortcode or widget — what’s the difference?
All three render the same UI. Use the block in the block editor, the shortcode in classic content areas, and the widget in sidebars (Appearance → Widgets). Each lets you override global defaults.
How do place and coordinates work?
Tide (experimental)
If you’re testing experimental tide support:
- Enabling: Turn on Tides in Settings → Spelhubben Weather and select a provider (WorldTides, NOAA or Custom endpoint). WorldTides typically requires an API key.
- Shortcode: Use extras="tides" or tides="1" to show tide events, e.g. [spelhubben_weather place="Gothenburg" extras="tides"] .
- Providers: WorldTides (global, commercial), NOAA Tides & Currents (US only), or supply a custom endpoint that returns JSON with events / extremes / data arrays (items should include time , and optionally type and height ).
- Troubleshooting: Use tests/tide_test.php to validate provider responses and caching. Ensure provider settings and API key are correct; tide results are cached according to the configured TTL.
If lat and lon are provided they take precedence. Otherwise the plugin geocodes the place string (e.g. place="Umeå" ). Set a global default place in settings.
What fields can I show/hide?
Use show="temp,wind,icon" (comma separated). Defaults are set in settings. Add wind_dir to show wind direction arrow and label.
How do layouts work?
Choose layout="inline|compact|card|detailed" . “Detailed” supports the multi-day forecast row.
Can I see individual provider data (for comparison)?
Yes! Use comparison="1" to show all enabled providers’ data side-by-side. Useful for debugging or comparing which providers are available in your location. Example: [spelhubben_weather place="Stockholm" comparison="1" providers="openmeteo,smhi,yr,fmi,openweathermap,weatherapi"]
What icon themes are available?
The plugin offers multiple themes: Classic (traditional), Modern Flat (clean, minimalist), Modern Gradient (contemporary with subtle gradients), Modern 2026 (duotone/stroke modern style), and Modern 3D (subtle gradients + drop-shadows). Choose in Settings → Spelhubben Weather → Icon style . All themes include icons for sun, partly-cloudy (including alternate), cloud, fog, rain, sleet, snow, storm/thunder, and hail where applicable.
How do I enable the map and set its size?
map=”1″ shows a smart OpenStreetMap-powered map. By default map_engine="auto" tries OpenLayers first, then Leaflet legacy, then a static fallback with coordinates and an OSM link. You can force map_engine="openlayers|leaflet|static" . Control height with map_height="240" (px). Global defaults exist in settings.
How do I get an hourly forecast?
Set hourly="1" and optionally hours="3–24" . Example: hourly="1" hours="24" . Hour labels follow the active site locale, such as 24-hour time for Swedish/Norwegian sites.
How do I enable animations?
animate=”1″ adds subtle UI animation. Global default is in settings. The renderer also accepts true , yes , or on as truthy values for convenience.
How do I get a daily forecast?
Set forecast="daily" and days="3–10" . Example: forecast="daily" days="5" .
How do I use moon phase?
Use extras="moon" to show moon phase in the weather meta area. Use extras="moon_daily" together with forecast="daily" to show moon information in the daily forecast. Example: [spelhubben_weather extras="moon"] .
Can I mix providers and get a consensus?
Yes. Set providers="smhi,yr,openmeteo,fmi" (order doesn’t matter). The plugin calculates a simple consensus across available providers for the displayed fields.
Units & format?
Pick a preset with units="metric|metric_kmh|imperial" . You can override parts via temp_unit="C|F" , wind_unit="ms|kmh|mph" , precip_unit="mm|in" , and date_format for forecast labels. All have global defaults in settings ( Units & format section).
Caching — how long is data stored?
Responses are cached with WordPress transients. Change TTL (minutes) in settings. Clear via the Clear cache button on the Performance page (Settings → Performance) or by changing attributes (which creates a new cache key).
Does it work without JavaScript?
Yes, rendering is server-side. Interactive maps require JS, but the map area can fall back to a static status with coordinates and an OpenStreetMap link.
Translations?
The plugin is fully translatable. Included translations: Swedish (sv_SE), Norwegian Bokmål (nb_NO) . Strings are also available on translate.wordpress.org. Bundled translation files live in /languages and include .pot , .po , .mo , .l10n.php , and block editor JSON files.
GDPR / privacy?
The plugin does not set cookies by itself. If you enable the map, OpenStreetMap tiles are requested client-side by the local OpenLayers/Leaflet runtime. Mention OSM in your privacy notice if needed.
Troubleshooting tips
Nothing shows: check that at least one provider is selected in settings. Wrong location: provide exact lat / lon or a more specific place (e.g. “Uddevalla, SE”). Map not visible: ensure map="1" and that your theme/container is wide/tall enough; increase map_height . Rate limiting: reduce refreshes or increase cache TTL.