• Hi wordpress-pros,

    I’m writing my own theme and i neet to use custom menus.
    So i activated Appearance > Menus with my functions.php file:

    function register_custom_menu() {
    	if ( function_exists('register_nav_menu') ) {
    	    register_nav_menus(array(
    	        'main' => __( 'Hauptnavigation' ),
    	        'sub' => __( 'Seitennavigation' )
    	    ));
    	}
    	unregister_nav_menu( 'primary' );
    }

    And I’m calling that method from my default-filters.php file.

    But when i create a custom menu with some pages it doesn’t show up anywhere in Appearance > Menus. So i cannot rename, change or delete it.

    Has anybody experienced the same problem and knows the solution how to get the menus appear?

    P.S.: I don’t use any plug-ins.

    Sorry if somebody posted the same issue, but I didn’t find it…

    Thanks in advance!

    Christian

Viewing 5 replies - 16 through 20 (of 20 total)
  • What happens if you switch to the Twenty Twelve theme?

    Thread Starter chrilehner90

    (@chrilehner90)

    I also thought that the problem is my theme. But I switched to the Twenty Twelve theme and I’m experiencing the same problem.

    Have you deactivated all plugins? Or even better, reset the plugins folder by PhpMyAdmin?

    You created a custom function register_custom_menu() but it’s not being called so it wont execute.

    If it were me I would just add the menus like this

    register_nav_menu('main', __( 'Hauptnavigation' ));
    register_nav_menu('sub', __( 'Seitennavigation' ));

    Thread Starter chrilehner90

    (@chrilehner90)

    IT’S SOLVED!!!

    Thank you very much for your time, esmi!!! ??
    The plug-ins were not the error…but i tried to use phpmyadmin and I got an error message. The error message (or a similar one) is in the following link and it’s including the solution:

    Link

    @ronangelo: i called the function register_custom_menu() from the default_filters.php file with the following code:

    add_action('init', 'register_custom_menu');

    But thank you both ??

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Custom menus don't show up in admin panel’ is closed to new replies.