Archived topic
Can't bring current-menu-item to live on homepage
5 replies · Started by Mathias on December 7, 2021
Hello,
as you can see here: https://mygoal.de in comparison to here: https://mygoal.de/trainingswissen/
the item <i class="fas fa-home"></i> is not displayed on homepage.
I've added custom CSS as suggested somewhere in the forum:
.main-navigation .main-nav ul li[class*="current-menu"] > a {
color: var(--accent) !important;
}
The homepage even in the main-menu is a static page /startseite but routed to https://mygoal.de by Wordpress itself. This is probably the reason why it is not recognized.
Do you have any suggestion for a workaround?
Thank you in advance.
Hi Mathias,
I'm not sure I understand your question, the CSS is working for both pages.
But the color in the CSS is the same as the the one you set in customizer for menu items :var(–accent) which is #004e9b.
So what color do you want the current menu item to use?
Hi Ying,
Thank you. I should have tested this on different browsers. The main menu now looks totally mad on Chrome and still has the same issue in Safari (Home icon missing on front-page).
What we wanted to achieve was plain white with always the same font color #004e9b. But obviously there is more to it and I have to figure out which changes in the past might have messed this up.
I would appreciate a quick look that might point me in the right direction.
You have this CSS which made the current menu item to white:
https://www.screencast.com/t/CeQ0TXN51
The home icon is using font from Fontawesome, it looks like your home page is missing some CSS from Fontawesome.
Yes, I have to look for that matter. As for now, the icon is replaced by a text. Thank you for your time and help.
You are welcome :)