WP Manifestindependent plugin directory
manifest / utilities / cwp_weather

Custom Weather Plugin

A custom WordPress plugin that adds an admin settings page to configure a city and API key, fetches live weather data from the OpenWeatherMap public API, and displays the result on the front end via a shortcode.

★ 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/pjpucan/cwp_weather/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A custom WordPress plugin that adds an admin settings page to configure a city and API key, fetches live weather data from the OpenWeatherMap public API, and displays the result on the front end via a shortcode.

Features

  • Admin settings page under Settings → Weather Plugin to save your API key, city, temperature unit, and cache duration.
  • Public API fetch from OpenWeatherMap using WordPress-native wp_remote_get(), with responses cached via Transients to minimise API calls.
  • Front-end output through the [weather_display] shortcode, which renders a clean, accessible weather card on any page or post.

Requirements

Installation

  1. Upload the custom-weather-plugin folder to /wp-content/plugins/.
  2. Activate via Plugins → Installed Plugins.
  3. Go to Settings → Weather Plugin and enter:
    • Your free OpenWeatherMap API key (register at https://openweathermap.org/api)
    • The city name (e.g. Manila,PH)
    • Preferred temperature unit
    • Cache duration in minutes
  4. Add [weather_display] to any page or post.

Shortcode Usage

Default (uses the city saved in settings):

[weather_display]

Override city inline:

[weather_display city="Manila,PH"]

Override both city and units:

[weather_display city="Sydney,AU" units="imperial"]