菜单种类:
- 桌面水平菜单-primary
- 桌面展开式菜单-expanded
- 移动菜单-mobile
- 页脚菜单-footer
- 社交网络菜单-social
functions.php
/**
* Register navigation menus uses wp_nav_menu in five places.
*/
function twentytwenty_menus() {
$locations = array(
'primary' => __( 'Desktop Horizontal Menu', 'twentytwenty' ),
'expanded' => __( 'Desktop Expanded Menu', 'twentytwenty' ),
'mobile' => __( 'Mobile Menu', 'twentytwenty' ),
'footer' => __( 'Footer Menu', 'twentytwenty' ),
'social' => __( 'Social Menu', 'twentytwenty' ),
);
register_nav_menus( $locations );
}
add_action( 'init', 'twentytwenty_menus' );