Hello Reader's! If you are new to WordPress and you have to create the menu for first time. You just have to do the steps below:-
Step1:- Open or Create a file functions.php in your theme folder and paste the code below:-
add_action( 'after_setup_theme', 'cmart_setup' );
if ( ! function_exists( 'cmart_setup' ) ):
function cmart_setup()
{
// This theme uses post thumbnails
add_theme_support( 'post-thumbnails' );
register_nav_menus( array(
'primary' => __( 'Primary Navigation', 'ThemeName' ),
'secondary' => __( 'Secondary Navigation', 'ThemeName' )
) );
}
endif;
Now open header.php and in place of static menu paste the code below:-
<?php wp_nav_menu( array(
'theme_location' => 'ThemeName' ) ); ?>
Now you can see the menu option is showing on Appearance tab
0 Comment(s)