Menu not appearing in custom theme
Question
I made a custom theme, but the menu is not showing in appearance section. I created a separate function file named function.php
and the code is:
add_theme_support( 'menus' );
function register_my_menu() {
register_nav_menu( 'new-menu', __( 'New Menu' ) );
}
add_action( 'init', 'register_my_menu' );
and calling in header.php
, the code is:
wp_nav_menu( array( 'theme_location' => 'new-menu' ) );
How to manage it?
When I create new pages, it shows as menu.
0
add-theme-support, customization, menus
4 years
2020-03-05T03:50:51-05:00
2020-03-05T03:50:51-05:00 0 Answers
103 views
0
Leave an answer