Custom menus created but does not show up in admin panel

I don’t think you need to initiate the menus again where register_nav_menus() itself is an initiator.

Syntax: <?php register_nav_menu( 'your-menu-handle', 'Your Menu Label' ); ?>

Copy the following code and Paste them into your functions.php without any function or add_action(), I hope it’ll work:

register_nav_menus(
    array(
     'front_login_menu' => __( 'Front Login Menu location'),
     'top_front_general_menu' => __( 'Top Front General Menu'),
     'top_general_menu' => __( 'Top General Menu'),
     'top_student_menu' => __( 'Top Student Menu'),
     'top_admin_menu' => __( 'Top Admin Menu'), 
     'top_trainer_menu' => __( 'Top Trainer Menu' )
    )
);

Use the following code into your theme, where you want to show the menu:

<?php wp_nav_menu (
            array (
                'theme_location'=>'front_login_menu', //change the slug here where necessary
                'fallback_cb'=>''
            )
        ); ?>

Leave a Comment