1

I am using wordpress 3.4.1.
I am mainly creating a static site and for that have created and arrnaged the pages, and wordpress has nicely created the pages in proper nav-menu format for me, which is good.
But, it has also added a link to 'Home' in the nav-menu. How can i remove that?

NOTE: I prefer any other answer than using the menu section and creating a new menu and assigning it as primary menu.

  • yep! this works... – rajankz Aug 23 '12 at 23:52
0

Here's a good solution posted over at .org

http://wordpress.org/support/topic/remove-home-from-menu-1#post-2215239

You can remove the "Home" link using a filter. Add this to your Theme's functions.php file:

   function mytheme_nav_menu_args( $args ) {
       $args['show_home'] = false;
       return $args;
   }

add_filter( 'wp_nav_menu_args', 'mytheme_nav_menu_args' );

And if you want to remove the "Home" link from the default fallback menu, add another filter:

   add_filter( 'wp_page_menu_args', 'mytheme_nav_menu_args' );
  • Okay, but happens when that solution doesn't work either? – user19765 Aug 28 '12 at 2:48
  • @Shawn This is an accepted solution. Are you implementing it properly? – Brian Fegter Aug 28 '12 at 4:38
  • This does not work. – Mike Kormendy Aug 10 '17 at 2:56
  • @MikeKormendy Most likely because We're at 4.8+ now. – Brian Fegter Aug 10 '17 at 12:03
  • Yep, just letting others know. – Mike Kormendy Aug 12 '17 at 15:52

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