奇怪的问题:我注册了两个菜单(主题位置),然后为每个菜单添加了两个不同的菜单(在Wordpress Admin中),但它总是在两个位置显示相同的菜单:
侧栏。php
<?php
wp_nav_menu(
array(
\'menu_name\' => \'Header Menu\',
\'theme-location\' => \'header-menu\',
)
);
?>
<div id="menu-content" class="back-canvas">
<div class="inner-menu-content">
</div>
</div>
<?php
wp_nav_menu(
array(
\'menu_name\' => \'Footer Menu\',
\'theme-location\' => \'footer-menu\'
)
);
?>
功能。php
add_action( \'init\', \'bc_init\' );
function bc_init() {
add_editor_style( get_stylesheet_directory_uri() . \'/css/editor-style.css\' );
load_theme_textdomain( \'bc_leimcke\', get_template_directory() . \'/lang\' );
register_nav_menus( array(
\'header-menu\' => \'Header Menu\',
\'footer-menu\' => \'Footer Menu\'
) );
}
has anyone had the same problem? any hints?