Madeira Weather documentation

How to set it up, and every setting, step by step.

Shortcodes

Every shortcode prints the weather the plugin last fetched, so a page never waits for a weather service. On a page served from a cache, the browser brings every widget up to date. Several shortcodes, and several copies of one, can share a page.

On every widget

Every shortcode that draws a widget also takes:

AttributeDefaultWhat it does
themethe site's lookA look by its id: atlantico, laurissilva, por-do-sol, noite, levada, postal, azulejo, or the id of a look you saved. See Looks and the theme editor.
iconsthe look'smeteo-fill, meteo-line, amcharts, lucide or tinted. See Icon sets.
modethe look'sauto, light or dark
skythe look'sanimated or off. See Weather backgrounds.

Example: [madeira_weather_cards theme="noite" icons="meteo-line" sky="animated"]

Location attributes take a town's name or its slug: Santana, santana and SANTANA are the same town, and so are São Vicente and sao-vicente. The Shortcodes tab lists the slugs of your towns.

True and false attributes take true or false.

Weather cards

[madeira_weather_cards]: a card per town with its icon, temperature, condition, "feels like", chance of rain, wind and activity tip. layout="hero" draws one big card per town instead, with the day's range, rain, wind, UV and the sea. The tip on each card follows IPMA's warnings, daylight and the weather before it shows your own tip for the temperature, and the badge goes only where the weather is genuinely good: see What the cards recommend. IPMA's warnings for the towns shown sit above the cards, and the time of the data under them.

AttributeDefaultWhat it does
layoutgridgrid, or hero: one big card per town
columnsauto1 to 6 columns, or auto to fit the space. On narrow screens the cards stack.
locationsallTowns to show, separated by commas: Funchal,Machico,Santana
show_recommendationstrueThe activity tip of the town's temperature level
show_map_buttontrueThe button set on the temperature level, if any
show_best_badgetrueThe best-weather badge
show_feels_liketrue"Feels like" temperature
show_humidityfalseHumidity in %
show_windshownfalse hides the wind
show_uvfalseUV index with its level (Low to Extreme)
show_wind_directionfalseWind direction (N, NE...) with an arrow pointing where the wind blows
show_precipitationshownfalse hides the chance of rain
show_wave_heightfalseWave height off Funchal, in metres
show_sea_tempfalseSea temperature off Funchal
show_warningsSettingsIPMA's warnings above the cards, once per page: the first widget that shows them has them, the others leave them out. false never, always on this widget even when another has them (default: Settings, Display, Weather warnings)
show_timetrueThe line under the cards: now, the forecast hour, the stations' time and the last update
ssrtruefalse prints a placeholder and leaves the weather to the browser
classExtra CSS classes

Example: [madeira_weather_cards columns="3" locations="Funchal,Santana,Porto Moniz" show_wind="true" show_precipitation="true"]

The first grid on a page gives each card an anchor named after the town, so a link to #funchal scrolls to Funchal's card.

Map

[madeira_weather_map]: the island coloured by temperature, rain or wind, with a pin per town and a tooltip. Choosing a region scrolls to its card, or opens the link set for it on the Maps tab. See The map.

AttributeDefaultWhat it does
mapmadeira-islandmadeira-island or porto-santo
width100%A CSS length: 100%, 600px, 40rem, auto
max_width980pxA CSS length, or none
layertemperaturetemperature, rain or wind: the layer it opens on
show_labelstrueTemperatures and names on the map
show_city_namestrueNames under the temperatures
show_legendtrueThe temperature levels under the map
clickabletrueRegions can be chosen with the mouse or the keyboard
show_warningsSettingsIPMA's warnings under the map's heading, once per page; false or always as on the cards
classExtra CSS classes

Temperature legend

[madeira_weather_legend]: the temperature levels and their colours, with today's date and the last update under them. Attributes: show_updated (true; false leaves the date out), title (your own heading) and class. The thresholds follow the site's unit.

Forecast

[madeira_weather_forecast]: one town, day by day, with the icon, high and low, and the chance of rain. Up to 5 days with IPMA, 7 with Open-Meteo.

AttributeDefaultWhat it does
locationFunchalThe town
days71 to 7 (IPMA has 5)
layouthorizontalhorizontal (the days side by side, with the highs and lows drawn as a band), vertical (a line per day, with a bar from low to high) or compact (side by side, no band)
show_precipitationtrueChance of rain
show_windfalseHighest wind of the day in km/h
ssrtruefalse prints a placeholder and leaves the forecast to the browser
classExtra CSS classes

A location that is not one of your towns shows nothing to visitors, and a short note to logged-in editors.

Sunrise and sunset

[madeira_sun_times]: today's sunrise and sunset in Funchal, in the site's time zone.

AttributeDefaultWhat it does
layoutverticalarc: the sun's path across the sky, where it is now, the length of the day, golden hour, and a note when the clocks change within the week. vertical or horizontal: sunrise and sunset as two cards. compact: the arc alone.
locationFunchalA town, for its own times (with arc)
show_iconstrueThe sunrise and sunset icons
classExtra CSS classes

Date and last update

[madeira_weather_date]: today's date in Madeira and how long ago the weather was measured ("Updated 12 minutes ago").

AttributeDefaultWhat it does
show_datetrueThe date
show_updatedtrueThe time since the last measurement
date_formatD, j M YA PHP date format
classExtra CSS classes

Comparison

[madeira_weather_compare]: towns side by side, as a table or as bars, with the best value of each row starred, or two towns face to face with layout="duel".

AttributeDefaultWhat it does
locationsallTowns, separated by commas
metricsallAny of temperature, temp_feels_like, humidity, uv, wind, precipitation, conditions
layouttabletable, bars, or duel: the first two towns face to face, row by row, and which is better today
highlight_besttrueStar the best value of each row: warmest, driest, calmest, lowest UV
limit51 to 11 towns
classExtra CSS classes

The Madeira widgets

ShortcodeShowsPage
[madeira_weather_sea]The sea on the south and north coasts, for boat tripsSea conditions
[madeira_weather_warnings]IPMA's weather warnings, as a bannerWeather warnings
[madeira_weather_golden_hour]Golden and blue hour, and your viewpointsGolden hour
[madeira_weather_levadas]The best levada walks todayBest levada walk today
[madeira_weather_viewpoints]The viewpoints, each with its sunrise or sunset and a verdictViewpoints
[madeira_weather_best_today]The best walk, beach and viewpoint right nowBest today in Madeira
[madeira_weather_tip]The day in a few sentencesToday in Madeira
[madeira_weather_clouds]A sea of clouds below the summit at sunrise (with an Open-Meteo key)Above the clouds

Updated

Since 3.4 the four lists of places (levada walks, trails, viewpoints and beaches) share one set of options: show only what is good, rank, sort, narrow by region or distance, pages and filters for visitors. See List options.

Since 3.3 the forecast, the comparison, Today in Madeira, the warnings and Above the clouds end with "Updated 20:41", when their data was fetched. show_updated="false" on a widget leaves it out. The cards and the map have their own line (now, the forecast hour, the stations' time and the last update), the walks, trails, beaches and airport say when their source reported.

Credit

[madeira_weather_credit]: the data source's credit line on its own ("Data: IPMA"), for layouts built from single values or the loop.

Single values

One value for your own layout. Each takes location (default: your first town) and class, and is brought up to date by the browser on a cached page.

ShortcodeShowsAttributes
[mw_temperature]22°Cunit="false" shows 22°
[mw_feels_like]24°Cunit
[mw_condition]Partly cloudyformat="key" gives partly_cloudy
[mw_icon]the iconsize in pixels (default 48)
[mw_humidity]65%unit
[mw_wind]12 km/hunit
[mw_wind_direction]NW with an arrowformat="degrees", show_arrow="false"
[mw_precipitation]20%unit
[mw_uv_index]6 (High)show_level="false"
[mw_location_name]Funchal
[mw_sea_temp]21°C off Funchalunit (no location)
[mw_wave_height]1.2m off Funchalunit (no location)
[mw_sunrise], [mw_sunset]07:15format: a PHP time format

Loop

[mw_loop]{template}[/mw_loop] repeats your template for each town. Attributes: locations, icon_size (pixels, default 48), class (wraps the result in a div), item_class (available as {item_class}).

Placeholders: {location_name}, {location_slug}, {temperature}, {temperature_raw}, {feels_like}, {feels_like_raw}, {condition}, {condition_key}, {icon}, {humidity}, {humidity_raw}, {wind}, {wind_raw}, {wind_direction}, {wind_direction_deg}, {wind_arrow}, {precipitation}, {precipitation_raw}, {uv_index}, {uv_index_raw}, {uv_level}, {sea_temp}, {wave_height}, {sunrise}, {sunset}, {item_class}.

The template may use div, span, p, h1 to h4, small, strong, em and br. A placeholder that does not exist stops the loop with an HTML comment naming it.

[mw_loop class="my-grid" icon_size="64"]
<div class="my-card {item_class}">
  <h3>{location_name}</h3>
  {icon}
  <p>{temperature}, {condition}</p>
</div>
[/mw_loop]
[madeira_weather_credit]

The loop is printed with the page; on a cached page it shows the weather of when the page was cached.

Help

Stuck on something in Madeira Weather?

Write to us. The people who build the plugin answer you.