[wordpress插件] Advanced Custom Fields: Widget Area Field高级自定义字段:小部件区域字段

wordpress 插件 文章 2020-02-07 12:00 519 0 全屏看文

AI助手支持GPT4.0

评分

96

96

描述

Easily add and change Widget Areas on any page template using Advanced Custom Fields and the Advanced Custom Fields: Widget Area Field plugin.

使用“高级自定义字段”和“高级自定义字段:窗口小部件区域字段”插件可轻松在任何页面模板上添加和更改窗口小部件区域。

This plugin will add a field with a drop-down selection of all registered Widget Areas in your WordPress installation.

该插件将在您的WordPress安装中添加一个带有所有已注册小部件区域的下拉列表的字段。

You can select which widget area you would like to display in your template files when using ACF’s get_field and the_field functions.

使用ACF的get_field和the_field函数时,您可以选择要在模板文件中显示的窗口小部件区域。

As of version 1.0, support for ACF v5 is included.

从1.0版开始,包括对ACF v5的支持。

This Plugin Requires Advanced Custom Fields Version 4 or Higher

此插件需要高级自定义字段第4版或更高版本

Advanced Custom Fields can be found in the WordPress Plugin Repository Here.

高级自定义字段可以在此处的WordPress插件存储库中找到。

Compatibility

兼容性

This add-on will work with:

该插件可以使用:

    • Advanced Custom Fields version 4 and up
    • 高级自定义字段版本4及更高版本

安装步骤

This add-on can be treated as both a WP plugin and a theme include.

此附加组件可以被视为WP插件和主题包含。

Plugin

插件

    1. Install through the WordPress plugin repository
    2. 通过WordPress插件存储库安装

    3. Activate the plugin via the Plugins admin page
    4. 通过“插件管理”页面激活插件

    Plugin (Manual)

    插件(手动)

      1. Copy the ‘acf-widget_area’ folder into your plugins folder
      2. 将“ acf-widget_area”文件夹复制到您的插件文件夹中

      3. Activate the plugin via the Plugins admin page
      4. 通过“插件管理”页面激活插件

      Include

      包含

        1. Copy the ‘acf-widget_area’ folder into your theme folder (can use sub folders).
        2. 将“ acf-widget_area”文件夹复制到主题文件夹(可以使用子文件夹)中。

        3. Edit your functions.php file and add the code below (Make sure the path is correct to include the acf-widget_area.php file. You should also change my_register_fields function name to something unique.)

          编辑您的functions.php文件并添加以下代码(确保路径正确,以包括acf-widget_area.php文件。您还应该将my_register_fields函数名称更改为唯一的名称。)

          add_action(‘acfegister_fields’, ‘my_register_fields’);

          add_action('acf / register_fields','my_register_fields');

          function my_register_fields() {
              

          function my_register_fields(){
              

          include_once(‘acf-widget_area/acf-widget_area.php’);

          include_once(‘acf-widget_area / acf-widget_area.php’);

          }

          }

下载地址

https://downloads.wordpress.org/plugin/advanced-custom-fields-widget-area-field.zip

https://downloads.wordpress.org/plugin/advanced-custom-fields-widget-area-field.zip

-EOF-

AI助手支持GPT4.0