I need to hide the “Home” link that’s generated from WordPress main menu on the homepage, and show it on the rest of the site.
I tried creating my own menu with no “Home” link and adding the “Home” link manually on the header.php file but it goes to the end of the menu and does not look like a pretty solution.
Any ideas? Using latest WordPress 3.2
If you only want to hide it to the users, i suggest using the following
CSS
:Explanation: WordPress generates several classes for the body tag. The
home
class is used to hide all links with the titleHome
on the homepage.Working Example (code taken from the default theme): http://jsfiddle.net/yJVyK/1/
Note: The attribute selector does not work in IE6
There is an another solution with PHP which more correct way in my opinion.
Source