Wordpress Main Menu - Hide the Home link on the main page only

I need to hide the "Home" link, which was created in the main Wordpress menu on the main page, and show it on the rest of the site.

I tried to create my own menu without the "Home" link and add the "Home" link manually in the header.php file, but it comes to the end of the menu and does not look like a beautiful solution.

Any ideas? Using the latest Wordpress 3.2

+4
source share
1 answer

If you want to hide it only for users, I suggest using the following CSS :

 body.home a[title="Home"] { display: none; } 

Explanation: Wordpress generates several classes for the body tag. The home class is used to hide all links with the title home on the main page.

Working example (code taken from the default theme): http://jsfiddle.net/yJVyK/1/

Note. attribute selector not working in IE6

+2
source