• Hello,
    I am making a wordpress theme by myself. I register the menus in my theme’s function.php and show the menu using wp_nav_menu(). But problem is that the registered menu is not showing on wordpress dashboard>appearance>. In appearance tab there are themes and editor tab but no menu tab.

    my function.php is as below :

    add_action('after_setup_theme', 'WP_Bstrap_setup' );
    
    function WP_Bstrap_setup() {
    load_theme_textdomain('WP_Bstrap',get_template_directory().'/languages');
    
    add_editor_style();
    
    add_theme_support('automatic-feed-links');
    
    add_theme_support('post-formats',array( 'aside','image','link','quote','status' ) );
    
    register_nav_menus( array('primary'  => __( 'Primary Navigation', 'WP_Bstrap' ),
      ) );
    add_theme_support('custom-background', array('default-color' => 'e6e6e6',));
    }

    and menu code:

    <?php
    wp_nav_menu( array('theme_location' => 'primary',
    			'menu_class' => 'nav'));
    ?>

    Please Help me to find where is the problem. I am new in WordPress.Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try to remove the extra comma inside the array.

    register_nav_menus( array('primary'  => __( 'Primary Navigation', 'WP_Bstrap' )) );

    OR try register_nav_menu instead, since you’re just registering 1 menu.

    register_nav_menu( 'primary', __( 'Primary Navigation', 'WP_Bstrap' ) );
    Thread Starter sajidk25

    (@sajidk25)

    Hello,
    thank you for response early.I removed the comma but no change. Also use
    register_nav_menu( 'primary', __( 'Primary Navigation', 'WP_Bstrap' ) ); but nothing happen.:(

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Menu doesnot show in Apperiance> Tab of dashboard’ is closed to new replies.