我有一个全新安装的WordPress 4.0.1,运行Twenty Fourteen主题,没有激活插件。
当我去外观>菜单,我只看到一个标签“编辑菜单”。缺少我之前版本中的“管理位置”选项卡。
当我创建新菜单时,它不可见。但是,如果我尝试创建一个具有相同名称的新菜单,我会收到一条错误消息,“菜单名称TESTMENU与另一个菜单名称冲突。请尝试另一个菜单名称。”
答案 0 :(得分:0)
事实证明,某些主题没有菜单位置,您需要通过主题functions.php
手动添加主题。无论如何,这就是我的所作所为:
add_theme_support( 'menus' ); // <-- if you already see `menus` from your settings menu, you can ignore this line.
function register_menus() {
register_nav_menus(
array(
'primary-menu' => _( 'Primary Menu' ) // add locations here.
'your-preferred-menu-location-id' => _( 'Title of your menu location' )
)
);
}
add_action( 'init', 'register_menus' ); // <-- of course without this, the function above will not execute.
如果上述代码不适合您,请尝试启用/禁用可能导致此问题的插件。
希望这有帮助。