Skip to content

samcoppock/wordpress-weather-shortcode-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Display Weather Plugin

--- About ---

This is a plugin which provides a shortcode block which displays the current temperature and a description of the weather in any UK city.

-- Assumptions --
This guide assumes that you already have a wordpress instance working which you have admin access to.
It also assumes knowledge of basic administration tasks such as use of the backend dashboard and use of the graphical page editor.

-- Requirements --

Wordpress 6.9
Php 8.4
Wordpress Docket Cache plugin ( optional )
openweathermap One Call API 3.0 subscription and API key
( https://openweathermap.org )

-- Installation --

1)
Copy the contents of the "current-weather" folder into wp-content/plugins folder in your site root.

2)
Enable the Weather Report plugin here. 
<your web address>/wp-admin/plugins.php

3)
If you do not already have an API key for openweathermap sign up for the One Call API 3.0 service and generate an API key, The API key may take some time to activate so if it does not work
Immediately wait for half an hour.
https://openweathermap.org/price#onecall
https://home.openweathermap.org/api_keys

4)
Set the $apiKey variable in \wp-content\plugins\current-weather\Includes\sccw-display-weather.php ( its near the top of the file).

-- Usage --

To insert a weather report shortcode simply visit any page while logged in as admin and add a shortcode block.
an example shortcode is.

[sccw-weather city=”thame”]

Where 'thame' is any valid city or town name in England.
If an invalid one if provided an error will be thrown.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages