WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to how can I hide the home in the menu without setting show_home in functions.php to false, I just want to do is hide it in a specific page. How can I do this? I am using the Twenty-Eleven Theme.

share|improve this question

Wordpress adds a unique class for each page in the body tag, you can use that class to target specific elements on your page through CSS.

.page-id-32 .menu-item-31 {display:none;}
share|improve this answer
general a plausible idea, but unfortunately, it does not do this for the 'home' tab, if the menu is done with the fallback function wp_page_menu() – Michael Oct 11 '12 at 11:39

If you're comfortable editing the theme, you could add a little PHP to your home link that will apply a CSS class when it's shown on a certain page:

<?php if (is_page('Page Title')) : echo ' class="current"'; endif; ?>

Where 'Page Title' is the title of the page on which you want to hide the button, and the class .current is applied when a user is on that page. Then just add the display: none CSS to .current.

share|improve this answer

Set the 'show_home' to false on that page only:

'show_home'   => ! is_page( 'The page title, ID or slug here' )
share|improve this answer

Your Answer


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.