wp admin – menu not showing up after registering

registered in the menu functions.phpBut they don’t show up in the Appearance > Menu section in the admin and the Pages, Posts, etc. options are grayed out.

Menus are saved because you cannot create menus with the same name again.

within functions.php,

function theme_setup() {
    add_theme_support( 'automatic-feed-links' );
    add_theme_support( 'post-thumbnails' );
    add_theme_support( 'html5', array( 'search-form' ) );
    /*** Register Menus */
    if (function_exists('register_nav_menus'))
    {
        register_nav_menus(
        array(
            'main-menu'         => __( 'Main Menu', 'site' ),
            'footer-menu'       => __( 'Footer Menu', 'site' ),
            )
        );
    }
}
add_action('after_setup_theme', 'theme_setup');

within header.php

wp_nav_menu(
                array(
                    'menu'          => 'Main Menu',
                    'container'     => '',
                    'depth'         => 1,
                    'theme_location' => 'main-menu',
                )
            );

within footer.php

wp_nav_menu(
                array(
                    'menu'          => 'Footer Menu',
                    'container'     => '',
                    'items_wrap'    => '',
                    'theme_location' => 'footer-menu'
                )
            );

The main issue here is that these menus do exist and are being displayed on the site, but they seem to be hidden within the admin panel and if a new menu is created it is never visible.

Using WordPress version 4.7 (latest)

Plugins:
current plugins

What could be causing this?

Leave a Comment