Archived topic
Current menu item is blue for some reason
3 replies · Started by Matthias on May 3, 2021
Hello, Tom and GeneratePress team!
On https://glasgutachter-sommer.de, the current menu item is blue when hovering over it. I never set anything to blue on that website. For sure, in Customizer > Colors > Primary Navigation, there's no blue anywhere.
Any idea where that comes from and how to get rid of it (short of writing my own CSS)? I made you an admin user, feel free to poke around.
1. Please, please, please find some way to let us configure colours for current menu items separately from anchors. If I put a link to website.com/#anchor in my menu, it's always formatted as a current menu item when I'm on the same page, and coming up with the CSS to force my way around that has cost me so much hair, I swear to God I used to look like Bon Jovi in the 80s and now I look like Bruce Willis.
Check out https://villa-nikolaos.de to see what I mean. That menu has a bunch of bona fide page links, and a few anchors, both on the top level and in the submenus. Especially when working with the anchors in the submenus, I went through all stages of grief short of acceptance many many times over, from shock to denial to anger to depression, the whole palette. SO many times, I thought I finally had it right and then I clicked on another page and all of a sudden, the colours were wonky again.
2. Thanks for the continued amazing work, for this great theme and in particular, for the steady commitment to great customer support that you keep exhibiting.
Thanks,
Matt.
Hi there,
if the color is not set in the Customizer > Colors > Priamry Navigation.
Then check the Header Element you have on the site - on the Site Header tab there are options for setting the nav colors when the element is set to Merge with Content.
The issue with current page items is due to WordPress it adds the current-menu-item / current-page classes to any menu link that is on the current URL. Yep its a pain and there hasn't be an easy solution to get around that problem without resorting to JS which is what plugins like Page Scroll to ID doesn.
Hello David,
Thanks for the pointer! We have no header element on the website, but I did some more poking just now and I realized there was a bit of CSS that I had completely overlooked towards the bottom of our custom CSS. It was meant to be commented out, but it wasn't and that's where the colour came from.
So sorry to have wasted your time with this! It was totally my own doing.
Many thanks for the plugin suggestion though! I will definitely look into this, it looks great. Do you foresee any conflict between this plugin and either Beaver Builder's or GP's own smooth scrolling implementation? Anything I should disable in GP when using this plugin?
Glad you found the issue.
I would disable the GP Smooth scroll option if you're using that plugin. It has its own script which will also work if you navigate to a jump link from another page.
Their documentation is quite thorough:
http://manos.malihu.gr/page-scroll-to-id-for-wordpress-tutorial/