How To Remove Double Menu Highlighting When Using One-Page Navigation With Anchor Link

Hi,

On our site. https://www.ensured.io we’re using the Ethos Agency stack and we have a “Services” link in the menu to an anchor link for Services on the same page. The problem is that when you go to the home page both the “Home” and “Services” links are highlighted bold (showing you the page you’re on). Is there a way to not have it highlight “Services” when on the Home page or some other alternative to resolve?

Thanks,
Joseph

Hi,

I kind of got this working on the home page now using the info you put here: https://theme.co/apex/forum/t/features-how-to-setup-one-page-navigation/96 but, now on https://www.ensured.io/news/ if you click on the “Services” menu it appends #services to the url ending up with https://www.ensured.io/news/#services which isn’t correct. It should go to https://www.ensured.io/#services.

Actually now if you go to https://www.ensured.io/news/ and click on the “Services” menu tab it still isn’t working. Any suggestions would be much appreciated.

  • Joseph

Hi there,

Thanks for writing in! Please use /#services instead of #services in the menu Item URL.

Cheers!

Hi,

I tried that and it did take care of the blog page not linking correctly, but now on the Home page - https://www.ensured.io both the “Home” and “Services” menus highlight.

  • Joseph

Hello Joseph,

You may have missed out something in setting up the one page navigation. Please be advised that when setting up one page navigation, you will need two separate menus. In your first menu, you will have to make the url to the services section in the homepage as https://example.com/#services and in the second menu, you only have to insert #services as the menu link url. The first menu will be assigned as the primary menu and the second menu will have to be used exclusively for your one page navigation menu.

If it does not work for you, please provide us access and we can set this up correctly.

I thought I fixed it, but I think I’ve tracked things down to a bug in X theme where if you set a Blog page “One Page Navigation” to a different menu than the primary page (i.e.; “OnePage Menu Secondary Pages”) then X theme doesn’t see that you’re not using the “OnePage Menu” menu.

So, if you go to https://www.ensured.io/news/ and click on “Services” in the main header menu then it will simply append #services to the current page since it’s using the “OnePage Menu” and not the “OnePage Menu Secondary Pages” that it should be using and was set on the Blog (news) page.

I’m going to send you via private message another set of credentials to log in and see what I’ve found.

Hello There,

I have logged in and resolved your issue.

  • OnePage Menu is your primary menu.
  • I made sure that your OnePage Menu which is your primary menu is using http://example.com/#services
  • I edited the blog page and disabled the one page navigation.
  • I edited your homepage and made sure that it is using “OnePage Menu Secondary Pages” menu for the one page navigation set up on the page.
  • I edited “OnePage Menu Secondary Pages” menu and made sure that the custom link is only using #services

Please check your site now.

Hi,

Unfortunately that doesn’t work either. If you go to any of the pages, such as “Get In Touch” (https://www.ensured.io/get-in-touch/), “Our Clients” (https://www.ensured.io/our-clients/), or “About” (https://www.ensured.io/about/) and then click on the “Services” menu from any of those pages it now won’t link anywhere because it’s just appending “#services” to the current page which doesn’t recognize that anchor link. Clicking on “Services” from “Blog” now does work though.

  • Joseph

Hi Joseph,

For all those three pages you have mentioned kindly make sure that one page navigation is disabled.

It should only be enabled in your homepage.

As my colleague have stated, you only need two menus for this set-up.

Thanks

Hi,

That seems to work and I have removed the third menu. Why will those pages only work when OnePage Navigation is disabled? Thank you.

  • Joseph

Hi Joseph,

When OnePage Navigation is disabled, the menu that will be displayed is you primary menu which has your full url(https://www.ensured.io/#services). If you are not in your homepage the only way to go back is with full url link.

Thanks

Thank you for your help!

You are most welcome.

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