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.
Leave a Reply
You must be logged in to post a comment.
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.
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.Set the
'show_home'
to false on that page only: