我需要添加四个显示在指定页面上的边栏小部件。当我向函数中添加代码来创建新的小部件时。php,它会禁用其他小部件。
页脚小部件和现有边栏小部件之一停止工作。它们仍然出现在Appearance -> Widgets, 但在网站上,他们停止显示。
下面是我用来添加小部件的代码。
if ( function_exists(\'register_sidebar\') ) {
register_sidebar(array(
\'name\' => \'Sidebar About\',
\'id\' => \'about-sidebar\',
\'description\' => \'Sidebar that shows only on the About page\',
\'before_widget\' => \'<li id="%1$s">\',
\'after_widget\' => \'</li>\',
\'before_title\' => \'<h2>\',
\'after_title\' => \'</h2>\',
));
}我担心我的客户网站有太多插件,可能会干扰创建新的小部件。