前言介紹
- 這款 WordPress 外掛「Weather Forecast Widget」是 2021-04-09 上架。
- 目前有 200 個安裝啟用數。
- 上一次更新是 2022-01-17,距離現在已有 1202 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.0.1 以上版本才可以安裝。
- 有 3 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
weather | forecast | openweathermap | weatherforecast | weather forecast |
內容簡介
一般
此外掛將從您自己的 API 金鑰中擷取 OpenWeatherMap API 的天氣資料,並顯示在小工具中。
輸入資料
您可以在小工具中顯示某個城市(輸入資料:城市名稱)或特定座標(輸入資料:緯度和經度座標)的天氣。
放置/短碼
這個天氣小工具可以在頁面、文章或小工具區域實現,並使用短碼 [weather_forecast_widget]。此外,您可以為每個短碼傳遞不同的屬性,以覆蓋此小工具放置的設定(例如,使用短碼屬性來管理小工具標題)。
範本
目前您可以為小工具選擇 3 個範本。
* 範本1
* 當天天氣和未來 3 天的天氣預報
* 範本2
* 範本2 使用 Bootstrap!
* 當天天氣和未來 3 天的小時天氣預報和天氣預報
* 範本3
* 範本3 使用 Bootstrap!
* 當天和未來 7 天的天氣,每天都有小時天氣預報和未來 3 天的天氣預報
* 警示模板1
* 警示模板1 使用 Bootstrap!
* 活躍的天氣警示
背景圖像
對於此小工具,您可以選擇自己的背景圖像。您可以在小工具設置中設置靜態背景圖像,或者選擇動態變體(在放置短碼的頁面/文章中使用的縮略圖)作為背景圖像。
天氣數據
除了每日天氣預報之外,此小工具還可以顯示小時天氣預報。這些預報可收起。
天氣警示
此小工具也會顯示天氣警示。這些警示可以關閉。
天氣圖示
您可以在小工具中找到美觀的天氣圖示。在插件的設置頁面中,您可以選擇要在小工具中使用的天氣圖示。
* 動畫圖示(填充)
* 靜止圖示
懶加載
您可以使用懶加載(ajax)加載小工具,只有當有必要時才會加載數據。
快取
現在快取是一個重要的話題。此天氣預報小工具使快取接收的天氣數據,以供下一個訪客訪問您的網站頁面/文章時使用。您可以在設置中設定所需的快取時間(快取時間最長可達 1 小時,以確保小工具中的天氣數據盡可能更新)。此快取功能還可以節省 API 呼叫。
短碼示例
為城市擷取天氣資料
[weather_forecast_widget city=”Kufstein”]
為城市擷取天氣資料並將城市名稱顯示為標題文本
[weather_forecast_widget city=”Kufstein” title_cityname=”X”]
為特定座標擷取天氣資料
[weather_forecast_widget lat=”47.5824″ lon=”12.1627″]
為特定座標擷取天氣資料並將 “天氣小工具的天氣” 顯示為標題文本
[weather_forecast_widget lat=”47.5824″ lon=”12.1627″ title_overwrite=”天氣小工具的天氣”]
懶加載擷取天氣資料
原文外掛簡介
GENERAL
The weather data for this widget will be retrieved from the OpenWeatherMap API with your own API key.
INPUT DATA
You can show the weather for a CITY (input data: city name) or for specific COORDINATES (input data: latitude & longitude coordinates) in the widget.
PLACEMENT/SHORTCODE
The weather widget can be implemented in a page, a post or into the widget area with the help of the shortcode [weather_forecast_widget]. Furthermore you´ll be able to pass different attributes to each shortcode to override your settings for this widget placement (e.g. manage widget title with an shortcode attribute).
TEMPLATES
Currently you can choose 3 templates for the widget.
* Template 1
* Current day´s weather with a weather forecast for the next 3 days
* Template 2
* Template 2 uses Bootstrap!
* Current day´s weather with an hourly weather forecast and a weather forecast for the next 3 days
* Template 3
* Template 3 uses Bootstrap!
* Weather for the current day and for the next 7 days, each with an hourly weather forecast and a weather forecast for the next 3 days
* Alert Template 1
* Alert Template 1 uses Bootstrap!
* Active weather alerts
BACKGROUND IMAGE
For this widget, you´ll be able to choose your own background image. Either you set a static background image in the widget settings or you choose the dynamic variant (thumbnail of the page/post, where the shortcode is placed) will be used as a background image.
WEATHER DATA
In addition to the daily weather forecast, an hourly weather forecast can also be displayed in the widget. Both the daily and hourly weather forecast can be collapsed.
WEATHER ALERTS
The weather widget also shows weather alerts. These alerts are dismissable.
WEATHER ICONS
In the widget you´ll find awesome and beautiful weather icons. In the plugins settings page you can choose which weather icons you want to use for the widget.
* Animated Icons Filled
* Animated Icons Not Filled
* Static Icons
LAZY LOADING
You have the possibility to load the widget with lazy loading (ajax) to load the data only when necessary.
CACHING
Nowadays caching is an important topic. This weather forecast widget makes it possible to cache the received weather data for the next visitor, who will visit your website page/post next time. You´ll be able to set your desired caching time in the settings (caching time possible up to 1 hour => this should ensure that the weather data in the widget is as current as possible). With this caching possibility you´ll also save API calls.
SHORTCODE EXAMPLES
Retrieve weather data for a city
[weather_forecast_widget city=”Kufstein”]
Retrieve weather data for a city and show city name as title text
[weather_forecast_widget city=”Kufstein” title_cityname=”X”]
Retrieve weather data for specific coordinates
[weather_forecast_widget lat=”47.5824″ lon=”12.1627″]
Retrieve weather data for specific coordinates and show “Weather for Weather Widget” as title text
[weather_forecast_widget lat=”47.5824″ lon=”12.1627″ title_overwrite=”Weather for Weather Widget”]
Retrieve weather data with lazy loading and template 3 for specific coordinates and expand the hourly and daily forecast initially
[weather_forecast_widget lazy_loading=”X” template=”3″ hourly_forecast=”show” daily_forecast=”show” lat=”47.5824″ lon=”12.1627″]
Retrieve weather alerts with lazy loading and alert template 1 for specific coordinates and expand the weather alerts initially
[weather_forecast_widget lazy_loading=”X” template=”alert_1″ alerts=”show” lat=”47.5824″ lon=”12.1627″ max_width=”500px”]
SETTINGS
Input box for your OPEN WEATHER MAP API key (the api key will be tested for validity while saving!)
Dropdown box to choose if caching of the weather data is necessary and if yes, which CACHE TIME should be used.
Media uploader/selector to choose a BACKGROUND IMAGE for the widget (optional – otherwise the page/post thumbnail will be used)
Radiobuttons to select the WIDGET TITLE TEXT, which will be displayed in the widget. This setting will be used as a default if nothing else will be passed in the shortcode. If you´ll pass title_cityname or title_overwrite as a shortcode attribute, this attribute will be processed in the widget output.
Dropdown to choose the POST META FIELD for the title text, if you selected the readio button “Post Meta Field (choose one of the dropdown below)“
Choose, which WEATHER VALUES should be shown in the widget
Choose, which UNITS should be used to display the weather values
Choose, which WEATHER ICONS should be used for the widget
TRANSLATIONS
German – adminbergtourentipptirol
Credits
Static Weather Icons provided from Erik Flowers Weather Icons
Animated Weather Icons provided from Basmilius Weather Icons
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Weather Forecast Widget」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0.0 | 1.0.1 | 1.1.0 | 1.1.1 | 1.1.2 | 1.1.3 | 1.1.4 | 1.1.5 | trunk |
延伸相關外掛(你可能也想知道)
wp-forecast 》你現在正在閱讀 wp-forecast 插件的 readme.txt 文件。, wp-forecast 是一個著名的 WordPress blogging 套件插件,顯示來自 accuweather.com 和/或 weatherbu...。
Weather Station 》Weather Station 是一個外掛,允許您在 WordPress 網站上顯示您可以訪問的氣象站的氣象數據。它完全支援多種型號的氣象站和免費或付費服務,不論您是否擁有一...。
OWM Weather 》您好,OWM天氣是從停產的 WP Cloudy 外掛衍生出來的。它使用許多相同的設置,但是完全獨立。, OWM天氣是一個靈活且易於使用的天氣外掛程式,可使用自定義文章...。
WCP OpenWeather 》- 侧边栏的当前天气和预测小部件以及页面的短代码;- 由免费的OpenWeatherMap API提供天气预报;- 转换温度,风速和气压的计量单位和设置;- 站点管理员的默...。
Moody Weather 》總結:Moody Weather 是一個外掛,用於顯示指定城市的當前天氣情況,包括溫度和基於情緒的描述,並使用 OpenWeatherMap API 獲取天氣數據。此外,外掛還使用 ...。
Extended Weather 》**總結:**, 這個外掛使用OpenWeather提供即時天氣詳細資訊,包括溫度、濕度、氣壓、風速、日出、日落以及相應的天氣圖示。用戶可以自定義外觀,呈現時尚、現...。
Yet Another Weather Plugin 》「Yet Another Weather Plugin (Yawp)」是一款外掛,可讓你從「openweathermap」取得天氣資訊並顯示在你的網站上。。
HD Weather Widget by The Waypoint 》開發:John Grefe - Twitter Google +, 設計:James Steward - Twitter Google +, 團隊: The Waypoint - http://consultants.thewaypoint.com, 此外掛使用 ...。
Custom Location Weather 》**總結:**, Custom Location Weather Plugin 是一個多功能的 WordPress 外掛,可以顯示全球任何位置的即時天氣信息和當地時間。非常適合旅遊網站、本地企業,...。
Animated Weather Widget 》**總結:**, , 增強您的WordPress網站,並使用OpenWeatherMap API和動畫Meteocons圖標提供時尚、現代的氣象小工具。這款輕量且易於使用的外掛允許您以乾淨、...。
WeatherFlow – Hourly weather forecast widget (1-48 hour forecast) 》**總結:** 使用WeatherFlow,您可以輕鬆地在您的網頁上嵌入詳細的每小時天氣預報,只需使用一個簡短代碼。選擇任何世界各地 OpenWeatherMap廣泛提供預報服務...。