• Resolved cassettewalkmans

    (@cassettewalkmans)


    How do you completely remove or hide the Menu when using the Twenty Ten theme?

    Any suggestions would be appreciated.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • remove wp_nav_menu(...) function from header.php file.

    If you choose to delete the line then remark it rather than delete it, just incase you want to reinstate it later.

    <?php /* REMOVED wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); */ ?>

    Another maybe better way is to make the menu optional, by default the navigation has a fall back to the WordPress page menu ‘fallback_cb’ => ‘wp_page_menu’

    You could just add an argument to remove the menu, and later if you want to show the menu you can just switch it on by setting it in the admin area’s Menu Locations.

    If you prefer this method the current code line found in header.php
    <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>

    Make the menu optional:
    <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary','fallback_cb' => '' ) ); ?>

    Now the menu will only show if you assign a menu in the admin section.

    Using a child theme or a copy is a good method as you do not have to add the changes everytime the default twenty ten theme is updated.

    David

    Thread Starter cassettewalkmans

    (@cassettewalkmans)

    Both your suggestions were awesome – appreciate it heaps! Problem solved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove menu from Twenty Ten Theme?’ is closed to new replies.