Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Remove HOME menu link from Home Page

Started by Peter Hanlon 9 years ago · 1 replies · 1672 views
9 years ago

For my home page, I've set visible: false in the advanced options. In doing so, Home nav menu is removed when navigating to all other pages such as About, Contact, etc.

Is there a way to only have the Home menu link to not be visible when on the home page but visible on all other pages?

I searched in the form and did not find a solution and apologize if this is a repeated question.

Thank you.

9 years ago

While you could do this with some fancy logic in your navigation twig, frankly I would just use CSS to hide the home link on the home page. This could be done with a body class that is being set on the homepage, and then something like:

CSS
.homepage ul.mainmenu li:first-child {
 display: none;
}

Of course this depends on your CSS

👍 1

Suggested topics

Topic Participants Replies Views Activity
General · by themetman, 23 hours ago
2 40 16 hours ago
General · by Hanns Mattes, 1 week ago
0 121 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago