Active menu color doesn't work (anymore)

edited July 16 in Menu / Mega menu

Is there a way to force the active menu color by CSS?

Somehow with the usual settings I cannot change this anymore, now, for a split second you get the menu text in active color, after which it immediately changes to the normal link color.

I tried this:

#Top_bar .menu > li.current-menu-item a span { color: #fbe997 !important; }

But that doesn't solve the issue.

p.s. I created the header as template and set the active color correctly through:

Header Template -> Menu -> Style -> Typography -> Active -> color.

Comments

  • Hey,

    Please send us the WordPress dashboard access privately through the contact form, which is on the right side at https://themeforest.net/user/muffingroup#contact and we will check what might be the reason.

    Notice!

    Please attach a link to this forum discussion.

    Sending incorrect or incomplete data will result in a longer response time.

    Therefore, please ensure that the data you send are complete and correct.

    Thanks

  • Done! :-)

  • We investigated it, and it the styles load on your website, but some script removes them.

    Do you not have some tool on the server that could cause this?

    If you do not recognise anything that could be the culprit, please also send us FTP access so we can take a closer look at this.


    Best regards

  • I have sent the FTP details.

  • Are you sure you have no cache or other optimizing plugins active on your server?

    We checked your files, and everything seems fine.


    Best regards

  • edited July 16

    No that I am aware of, WP without any caching, server with php version 8.2 and the following modules active (see screendump), does this give a hint to what might be causing this? Or could some other setting cause this issue? Haven't had any prior related issue with this development server though.

    Also tried version 8.1 but still the same problem.

    But I have discovered something strange, in the website navigation, there is one navigation item with submenu's, when you select one of the submenu's in it, the active color is kept.


  • We found the root cause, and it was because you had enabled the One Page option in the page settings.

    We initially did not think about it at first, and it removes a class from the menu that indicates the active menu. After disabling the One Page option, it started to work correctly.


    Best regards

  • edited July 18

    Ah great, I would have never, never found that by myself, even though this one page solution somehow makes sense, it is a bit of a small bug/flaw I guess?

    The one page was enabled because of the pre-built theme I liked and used, but I extended the website with extra pages by duplicating the main (one) page, so never thought about that setting again. Good to know this can cause the issue.

    But even then, basically - even with one page enabled - it is useful to have the active color functionality (menu navigation links directing to specific anchor sections on page and then have the active color changed in the menu to point out position). Hopefully this flaw can or will be solved in a future version.

    Glad you guys found it though and thanks for the help!

    Kind regards

  • One page to function correctly requires this feature to work properly.

    It searches for the section with the appropriate ID to highlight in the menu. Otherwise, all menu items would be highlighted on One page websites, which is not the desired result.


    Best regards

  • Ah, wasn't aware of that, makes sense.

    Thanks again!

Sign In or Register to comment.