Navbar links colour changes to hover color

Hi,

I’ve got problems with the navbar links colours. I added a hover colour to the links which works fine in general.
But if I enter the imprint (Impressum) page (which is another page) and navigate back to the main page, the navbar links are always displayed in the hover colour.

My page: http://lenit-muenchen.de/
How to reproduce:
1 open page
2 click on “Allgemeine Informationen”, “Einsatzbeispiele” or “Kontakt” -> everything is fine
3 click on “Impressum” -> new page is loaded -> everything is fine
4 click again on “Allgemeine Informationen”, “Einsatzbeispiele” or “Kontakt” -> navbar links are now displayed in hover-colour red instead of black

Thanks in advance for any advise!

Nicolas

Hey Nicolas,

You’re using the One Page Navigation setup globally and that’s not recommended in our theme usage. The solution for this is to use 2 Menus in WordPress. You currently have 1 of that said menu which uses full URL like http://lenit-muenchen.de/?page_id=16#general. I believe you’re currently using that as your Primary Menu which is correct.

You should now create the same menu but instead of using Full URLs, use the fragment identifiers only like #general.

Next, edit your home page and under Page Settings, select the new menu you’ve created as the One Page Navigation menu.

Hope that helps.

Hey Christian,

thanks for your reply! To be honest it didn’t work out for me.
I finally decided to move the links to legal text pages in the footer menu. But now I am facing some similar problems.

What I did:

  • I added a second menu and used it as footer menu (Impressum)
  • The chosen menu for “One Page Navigation” in settings is the primary menu containing “Allgemeine Informationen 2”, “Einsatzbeispiele 2” and “Kontakt 2”

my problem is: If I open http://lenit-muenchen.de all menu items are displayed in the hover colour (red). This changes as soon as the buttons are activated, but no initially.

Hope you can help me with that problem as well …

Thanks and best regards
Nicolas

Hi Nicolas,

The menu you have set as the Primary Menu in WP Admin > Appearance > Menus should be the other menu you have created which the one page menu should be the menu contains the link on the same page.

You may also try adding this code in the custom JS:


(function($){

	$('.x-navbar .desktop .x-nav > li').removeClass('current_page_item, current-menu-item');

})(jQuery);

Kindly note that since this is a custom code that changes the default behavior/display of the theme, you will be responsible to maintain or update the code in case you require further changes or if the code stops working in future updates. If you are uncertain how to proceed, it would be best to get in touch with a developer.

Hope this helps.

Hi guys,

thanks for your help, I finally found the problem :grinning:, now it works fine.

Nicolas

You’re welcome!
It’s good to know that the issue has been found and been resolved already.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.