为小部件创建一个自定义侧边栏/任意区域

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了为小部件创建一个自定义侧边栏/任意区域相关的知识,希望对你有一定的参考价值。

Cut-and-paste the following into your functions.php file (inside of your theme folder).

Change the Name-goes-here to whatever you want.
  1. register_sidebar(array(
  2. 'name' => 'Name-goes-here',
  3. 'description' => 'Description goes here',
  4. 'before_title' => 'html before the sidebar goes here',
  5. 'after_title' => 'HTML after the sidebar goes here'
  6. ));

以上是关于为小部件创建一个自定义侧边栏/任意区域的主要内容,如果未能解决你的问题,请参考以下文章