[wordpress插件] Core Sidebars核心侧栏

wordpress 插件 文章 2020-04-03 00:30 474 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

A plugin that enables you to have dedicated content and/or widget sidebar for each specific page or post.

一个插件,使您可以为每个特定页面或帖子拥有专用的内容和/或小部件侧栏。

For example, on a featured blog post you may want to place additional contact while on a calendar page you might want to place a calender widget or some text events or both.

例如,在一个精选博客文章上,您可能想放置其他联系人,而在日历页面上,您可能想放置一个日历小部件或一些文本事件,或者两者都放置。

Widget Support

小部件支持

Widget support is enabled by default and you do not have to add any code.

窗口小部件支持默认情况下处于启用状态,您不必添加任何代码。

The only recommended change is that you go to your template’s functions.php file and remove any coding containing a function similar to the one below.

唯一建议的更改是转到模板的functions.php文件,并删除所有包含与以下功能类似的代码。

if ( function_exists('register_sidebar') )    

  if(function_exists('register_sidebar'))    

register_sidebar();

register_sidebar();

To enable widgets on a page or post, go to the manage screen and click ‘Add Widgets!’ to add or ‘Remove Widgets’ to remove.

要在页面或帖子上启用小部件,请转到管理屏幕,然后单击“添加小部件!”以添加或单击“删除小部件”以删除。

Notes

注释

This plugin is ONLY for WordPress 2.5+.

此插件仅适用于WordPress 2.5+。

It will not work with lower versions and may in fact corrupt the data in older versions.

它不适用于较低版本,并且实际上可能会破坏较旧版本中的数据。

Please stay up to date with both WordPress and this plugin.

请保持最新状态,同时使用WordPress和此插件。

When using this plugin instead of Page Sidebars, this plugin will overwrite any of the widget configurations previously used.

使用此插件代替Page Sidebars时,此插件将覆盖以前使用的任何窗口小部件配置。

Also, do NOT use this script with Page Sidebars as it will lead to compatibility issues.

另外,请勿将此脚本与“页面侧边栏”一起使用,因为这会导致兼容性问题。

Using this plugin will overwrite your other widget sidebars defined in your template.

使用此插件将覆盖模板中定义的其他小部件侧边栏。

Proceed with caution.

谨慎进行。

For an older version of this plugin for WordPress versions 2.3.3 or lower, check out Page Sidebars.

对于该插件的旧版本(适用于WordPress 2.3.3或更低版本),请查看页面侧边栏。

安装步骤

    1. Upload the directory /core-sidebars/ into your WordPress directory under /wp-content/plugins/

      将目录/ core-sidebars /上载到/ wp-content / plugins / 下的WordPress目录中

    2. Open your administration panel and go to Plugins and activate it by clicking Activate next to the description of Core Sidebars.

      打开管理面板,转到“插件”,然后单击“核心侧边栏”说明旁边的“激活”将其激活。

    3. You are now able to begin using the plugin.

      您现在可以开始使用插件了。

      Go to the Manage menu to edit a post or a page or write a new page or post.

      转到“管理”菜单以编辑帖子或页面,或编写新页面或帖子。

      Either way, you will find a new meta box entitled “Sidebars and Widgets”.

      无论哪种方式,您都将找到一个名为“ Sidebars and Widgets”的新元框。

      Click to open and then you will find the two boxes to enter your content.

      单击以打开,然后您将找到两个框以输入您的内容。

      HTML is allowed in the content box.

      内容框中允许使用HTML。

    4. To include the data in the function, delete everything inside your sidebar.php except for your style container.

      要在函数中包含数据,请删除sidebar.php中除样式容器之外的所有内容。

      Now, using add this PHP code by customizing it to your needs.

      现在,通过根据需要定制此PHP代码来使用。

    $sboptions = array(     

    $ sboptions =数组(     

    'order' => 'title-content-widgets',     

    'order'=>'title-content-widgets',     

    'before_title' => '',     

    'before_title'=>'',     

    'after_title' => '',     

    'after_title'=>'',     

    'before_content' => '',     

    'before_content'=>'',     

    'after_content' => '');

    'after_content'=>'');

    coresidebar($sboptions);

    coresidebar($ sboptions);

下载地址
https://downloads.wordpress.org/plugin/core-sidebars.zip
-EOF-

AI助手支持GPT4.0