"Widgets" menu doesn't appear

时间:2013-09-20 作者:Daniel Sarmas

我正在开发一个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安装似乎不会中断。

1 个回复
SO网友:Daniel Sarmas

这些服务器之间的另一个区别是,问题所在的实时服务器是通过fantastico安装的。手动重新安装后,一切正常。

结束

相关推荐

Wordpress Remove Submenus

我在这里找到了一个已回答的问题Remove menus and submenus 2 Answers 对于我的问题,但是否有一种方法可以稍微更改代码,以便删除所有编辑器角色的子菜单。不仅仅针对一个用户?有没有办法改进这段代码?我正在使用3.5.1 WordPress版本code that I am using: add_action(\'_admin_menu\', \'remove_editor_submenu\', 1); function remove_editor_submenu() {&