Hide the #achor in the address bar when using one page navigation

I’ve looked for an answer to this question in this forum, and can’t find it. I used to be able to do this in X theme, but now that I’m using Pro, I can’t figure it out. Hopefully I can describe what I want to do.

I have a one page site that I’m building in Pro version 2.3.8, Wordpress version 4.9.8. I’ve set up a menu that has two menu items that link to /#aboutus and /#ourservices. I’ve added the appropriate ID in the Customize tab of the sections that I want to link to.

When I click on the links, the URL that displays in the address bar shows the anchor (i.e. https://new.gavin.fish/#ourservices). The good news is that the anchors are working, but what I really want is for the anchors to work but not show up in the address bar. Not sure if that makes sense, but I was able to do this in X.

Any ideas?

Hey @gavn8r,

Before, X and Pro has a script that removes the hash from the URL which is not the normal behavior in web browsing.

X and Pro now reverted to the normal behavior which is attaching the fragment or hash to the URL. It also has an advantage over the previous behavior. Now your users can copy the link to specific sections of your site and X and Pro will smooth scroll to those sections from a URL with hash.

Custom development would be required to remove the has from the URL. You would need to consult with a third party developer to create a custom solution.

Thanks.

Thank you for the reply, Christian. I hadn’t thought about it that way. I’m happy to keep it the way it is now.

Thanks again!

You’re welcome. :slight_smile:

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