[wordpress插件] Basic Banner基本横幅

wordpress 插件 文章 2020-02-29 15:10 1393 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Basic Banner is a plugin that allows you to create and display banners in WordPress.

Basic Banner是一个插件,可让您在WordPress中创建和显示横幅。

This plugin creates custom post type called banner to store all the banners.

该插件会创建称为横幅的自定义帖子类型,以存储所有横幅。

Displaying the Banner

显示横幅

You can display the banners by using basic banner widget.

您可以使用基本的横幅小部件来显示横幅。

There is also a shortcode :

还有一个简码:

[basicbanner name="" class=""]

  [basicbanner name =“” class =“”]

And a function for displaying banners anywhere in your theme :

以及用于在主题的任何位置显示横幅的功能:

  <?php basic_banner_show($ name,$ class =''); 

?>

?>

Parameter $name is the banner slug and $class is the additional HTML classes for banner container.

参数 $ name 是横幅条,而 $ class 是横幅容器的附加HTML类。

To get the banner object, you can use this function :

要获取标题对象,可以使用以下功能:

  <?php $ banner = basic_banner_get($ name); 

?>

?>

Override Banner Template

覆盖横幅模板

    1. Locate folder template in Basic Banner plugin folder (wp-content/plugins/basic-banner/template).
    2. 在Basic Banner插件文件夹(wp-content / plugins / basic-banner / template)中找到文件夹 template

    3. Copy banner.php file to your theme folder under the folder called basic-banner (wp-content/themes/your-theme/basic-banner/banner.

    4. banner.php 文件复制到名为 basic-banner 的文件夹(wp-content / themes / your-theme / basic-banner / banner)下的主题文件夹中。

      php).

    5. php)。

    6. Modify banner.php file as you like.
    7. 根据需要修改 banner.php 文件。

    Contribute on GitHub

    在GitHub上贡献

    You can contribute to this plugin via the GitHub repository.

    您可以通过 GitHub存储库对此插件做出贡献。

安装步骤

Automatic installation

自动安装

Automatic installation is the easiest option as WordPress handles the file transfers itself.

自动安装是最简单的选项,因为WordPress会自行处理文件传输。

    1. Log in to your WordPress dashboard.
    2. 登录到WordPress仪表板。

    3. Go to Plugins > Add New and search “Basic Banner”.
    4. 转到插件>添加新,然后搜索“基本横幅”

    5. Once you’ve found our plugin, you can install it by simply clicking “Install Now”.
    6. 找到我们的插件后,只需单击“立即安装” 即可安装它。

    7. Activate the plugin.
    8. 激活插件。

    Manual installation

    手动安装

      1. Download the plugin via WordPress.org.
      2. 通过WordPress.org下载插件。

      3. Upload the ZIP file through the ‘Plugins > Add New > Upload’.
      4. 通过“插件>新增>上载” 上传ZIP文件。

      5. Activate the plugin.
      6. 激活插件。

      7. For more detail about manual installation you can read it here.
      8. 有关手动安装的详细信息,您可以在此处阅读

      Updating

      更新

      Automatic updates should work like a charm;

      自动更新应该像灵丹妙药一样工作;

      as always though, ensure you backup your site just in case.

      与往常一样,请确保备份站点以防万一。

下载地址
https://downloads.wordpress.org/plugin/basic-banner.1.1.2.zip
-EOF-

AI助手支持GPT4.0