我正在开发一个WordPress主题,它在我的本地主机和一个live server上运行得很好,但在我的另一个live server上,小部件菜单(从外观)不会出现。是的,所有3台服务器都有相同的3.6.1 WordPress版本,主题文件也相同。知道这是什么原因吗?
这是functions.php
注册小部件区域:
if (function_exists(\'register_sidebar\')) {
register_sidebar(array(
\'name\' => \'RLTheme - Footer Left\',
\'id\' => \'rltheme_footer_left\',
\'description\' => \'The left area of the footer.\',
\'before_widget\' => \'\',
\'after_widget\' => \'\',
\'before_title\' => \'<h3>\',
\'after_title\' => \'<span></span></h3>\'
));
register_sidebar(array(
\'name\' => \'RLTheme - Footer Center\',
\'id\' => \'rltheme_footer_center\',
\'description\' => \'The center area of the footer.\',
\'before_widget\' => \'\',
\'after_widget\' => \'\',
\'before_title\' => \'<h3>\',
\'after_title\' => \'<span></span></h3>\'
));
register_sidebar(array(
\'name\' => \'RLTheme - Footer Right\',
\'id\' => \'rltheme_footer_right\',
\'description\' => \'The right area of the footer.\',
\'before_widget\' => \'\',
\'after_widget\' => \'\',
\'before_title\' => \'<h3>\',
\'after_title\' => \'<span></span></h3>\'
));
register_sidebar(array(
\'name\' => \'RLTheme - Sidebar Left\',
\'id\' => \'rltheme_sidebar_left\',
\'description\' => \'The right sidebar area.\',
\'before_widget\' => \'<div class="sidebar_area">\',
\'after_widget\' => \'</div>\',
\'before_title\' => \'<h3>\',
\'after_title\' => \'</h3>\'
));
register_sidebar(array(
\'name\' => \'RLTheme - Sidebar Right\',
\'id\' => \'rltheme_sidebar_right\',
\'description\' => \'The left sidebar area.\',
\'before_widget\' => \'<div class="sidebar_area">\',
\'after_widget\' => \'</div>\',
\'before_title\' => \'<h3>\',
\'after_title\' => \'</h3>\'
));
}
另外,如果我从我的主题切换到默认主题(在激活主题时无法看到“小部件”菜单的实时服务器上),我可以看到“小部件”菜单,因此那里的WordPress安装似乎不会中断。