Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using the following code for my navigation structure. Currently it shows a home link in the navigation. Why does this show? and how would I get rid of it by changing this code.

<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location'=> 'primary' ) ); ?>
share|improve this question
add comment

1 Answer

it shows the home link cause you don't have anything set yet...

go to your functions.php and add this code

 add_theme_support( 'menus' );
  if ( function_exists( 'register_nav_menus' ) ) {
  register_nav_menus(
    array(
          'header_menu' => 'Header Menu'
        )
    );

}

endif;

Go to Apparence and then get into Menu option... Create a menu set the pages/links/categories or whatever you want on it. Make sure you set the menu you just created in the dropdown list you have on top left in that panel. That should be enough to call the menu you want where you set the code you have.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.