How can I hide Home in my menu in a specific page?

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.

Related posts

Leave a Reply

3 comments

  1. 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;}
    
  2. 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.