Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to create menu using Wordpress

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 319
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: