[wordpress插件] DobsonDev WeatherDobsonDev天气

wordpress 插件 文章 2020-04-20 16:21 423 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Adds the Weather to your site.

将天气添加到您的站点。

The weather app is avaliable as both a widget and a shortcode.

天气应用程序既可以作为小部件也可以作为简码。

If you have any problems or questions please email me at alex@dobsondev.com.

如果您有任何问题或疑问,请发送电子邮件至 alex@dobsondev.com

Widget

小部件

To get the Widget working, simply go to Appearance -> Widgets and drag the “DobsonDev Weather Widget” to where ever you want it to display.

要使小部件正常工作,只需转到外观->小部件,然后将“ DobsonDev Weather小部件”拖到您希望其显示的位置。

Inside the widget you simply need to fill out the City/Town you want the weather for.

在小部件内,您只需要填写所需天气的城市/城镇即可。

The City/Town should be in the format of Town or City, comma, then the country code.

城市/城镇的格式应为城镇或城市,逗号,然后是国家/地区代码。

For example, New York would be location=”New York, US”.

例如,纽约将是location =“美国纽约”。

Click save and the widget will then display the weather on the front end of the site.

单击“保存”,然后小部件将在网站的前端显示天气。

Shortcode

简码

[weather location=”City/Town, CC” align=”align”]

[天气位置=“城市/城镇,CC” align =“ align”]

This Shortcode will embed the weather app into your page.

此简码会将天气应用嵌入到您的页面中。

Be sure to replace the above code with information pertaining to you.

确保用与您有关的信息替换上面的代码。

The location should be in the format of Town or City, comma, then the country code.

该位置的格式应为城镇或城市,逗号,然后是国家/地区代码。

For example, New York would be location=”New York, US”.

例如,纽约将是location =“美国纽约”。

The alignment is where you want the shortcode to be aligned to.

对齐是您希望短代码对齐的位置。

This works the same way as the WordPress image alignments, so your choices are “right”, “left”, or “center”.

此方法与WordPress图像对齐方式相同,因此您可以选择“右”,“左”或“中心”。

API Key

API密钥

Please note that this plugin DOES use an API to get the weather and you do have to supply your own API key (the key is free with paid versions for high traffic).

请注意,此插件确实使用API​​来获取天气,并且您必须提供自己的API密钥(该密钥是免费的,付费版本用于高流量)。

The API used for this plugin is Open Weather Map.

用于此插件的API是打开天气地图

You can register for an API key here: http://openweathermap.orgegister.

您可以在此处注册API密钥: http://openweathermap.orgegister

安装步骤

    1. Upload the entire dobsondev-weather-app folder to the /wp-content/plugins/ directory.
    2. 将整个dobsondev-weather-app文件夹上载到/ wp-content / plugins /目录。

    3. Activate the plugin through the ‘Plugins’ menu in WordPress.
    4. 通过WordPress中的“插件”菜单激活插件。

    5. Go to Open Weather Map and register for a FREE API Key.

    6. 转到打开天气地图并注册免费的API密钥。

      If you get a lot of volume you can upgrade to a paid version.

    7. 如果数量很多,您可以升级到付费版本。

    8. Go to the DobsonDev Weather settings page on the backend of your site.
    9. 转到网站后端的DobsonDev天气设置页面。

    10. Enter your API key in the field on the settings page.

    11. 在设置页面上的字段中输入您的API密钥。

      Click Save.

    12. 点击保存。

    13. Done!
    14. 完成!

下载地址
https://downloads.wordpress.org/plugin/dobsondev-weather.zip
-EOF-

AI助手支持GPT4.0