跳到内容

PDS Weather

v4.5.4

proodos · 2015年5月30日 上架

Shows current weather conditions for your city using OpenWeatherMap API. Drag-and-drop widget or template function.

正在使用
10+
评分
2.5 / 5
累计下载
1.3 万
最近更新
2026年11月13日
2 条评价需要 WordPress 6.5+已测试到 7.2PHP 7.4+

贡献者

PDS Weather shows current conditions in your area using the OpenWeatherMap API (free tier).

The plugin fetches and displays:

  • Current weather description
  • Current temperature (°C and/or °F)
  • “Feels like” temperature
  • Weather font icon (optional)
  • City name display (optional)
  • Air Quality Index (optional)
  • UV Index (optional)

Data is cached for one hour to minimize API calls.

New in 4.5.3:

  • Manual colour mode — choose Auto (follows the visitor’s browser/system preference, as before), Always light, or Always dark under PDS Weather > Appearance. Useful when Auto dark mode doesn’t match your site’s own (always-light or always-dark) design.

New in 4.5.0:

  • Automatic Dark Mode — the widget adapts to the visitor’s browser colour-scheme preference (with an OS-preference fallback when JavaScript is disabled). No configuration required.
  • Air Quality Index — optionally display the Air Quality Index from the OpenWeatherMap Air Pollution API (e.g. “Air Quality: 2 (Fair)”).
  • UV Index — optionally display the UV Index value (e.g. “UV Index: 5.2”).
  • Custom CSS editor — a new Appearance tab lets you add your own CSS to style the widget without editing plugin files.

Requirements:

Setup:

  1. Go to PDS Weather > Settings in your WordPress admin.
  2. Enter your OpenWeatherMap API key.
  3. Select your country and enter your city name.
  4. Choose display options (icon, degrees, feels like, weather label, city name).
  5. Save settings.

Display options:

  1. Use the PDS Weather Gutenberg block in the Block Editor.
  2. Use the PDS Weather classic widget (Appearance > Widgets).
  3. Use the [pdsweather] shortcode in any post or page.
  4. Or call <?php echo pdsweather_display(); ?> in your theme template.
  5. Legacy function pdsWeather() is still supported for backward compatibility.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums