您需要将其添加到函数中。php文件,并删除现有的nav\\u菜单功能:
<?php
add_action( \'init\', \'register_my_menus\' );
function register_my_menus() {
register_nav_menus(
array(
// Add Your Current Menu Register Here And Replace The Current Code With This
\'secondary\' => \'secondary\' ,
\'tertiary\' => \'tertiary\',
)
);
}
?>
To use the menu\'s you would place this in the template desired:
<?php wp_nav_menu( array( \'theme_location\' => \'secondary\' ) ); ?>
OR:
<?php wp_nav_menu( array( \'theme_location\' => \'tertiary\' ) ); ?>