WP Manifestindependent plugin directory
manifest / editor / simple-weather-block

Simple Weather Block

Simple Weather Block- the test tasks for NEXT.io for Nikolaj Popovic

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/nik-coder/simple-weather-block/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Displays current weather for any location, via a Gutenberg block, fetched from the free Open-Meteo API and cached server-side.

Description

Simple Weather Block adds a "Weather" block you can drop into any post or page. Editors set a latitude, longitude, and label in the block sidebar; the front end renders a small card with current temperature, wind speed, and conditions.

  • No API key required (uses the free Open-Meteo API).
  • Response is cached in a transient for 30 minutes, filterable via swb_cache_ttl.
  • Fails gracefully: if the API is down or returns something unexpected, the block shows a quiet fallback message instead of a fatal error or blank page.

Installation

  1. Upload the simple-weather-block folder to /wp-content/plugins/.
  2. Activate the plugin through the "Plugins" screen.
  3. Add the "Weather" block to any post or page and set a latitude/longitude in the block settings panel.

Frequently Asked Questions

Does this require an API key?

No. It uses Open-Meteo (https://open-meteo.com), which is free and keyless for non-commercial use.

How long is data cached?

30 minutes by default. Use the swb_cache_ttl filter to change it.

Explanation

Changelog

1.0.0

  • Initial release.