CSS selector for “home” page link when current?
-
I’m trying to move my site from an old third-party site builder (Dynamik Website Builder (DWB), a Genesis child theme) to Twenty Twenty-Two.
My site is all static pages and not terribly complicated. I prefer a minimal look and don’t currently use page titles.
One little touch I like is having the nav menu item for the current page be a different color.
I can do this in DWB/Genesis, but there’s a problem with 2022:
The 2022 theme assigns the class
.current-menu-item
to all pages EXCEPT for the static home page.I’m wondering if there’s another way to target the home page nav menu link when it’s the current page. So far, I haven’t seen anything.
Assigning a custom CSS class to that menu item doesn’t help, because it applies all the time, not just when it’s the current page.
One might argue that it’s clear when you’re at the home page, but I’d like the highlighting of the current page to be consistent.
Ideas?
Thanks!
- This topic was modified 2 years, 6 months ago by .
- This topic was modified 2 years, 6 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘CSS selector for “home” page link when current?’ is closed to new replies.