Archived topic
How to hide ID / anchor in address bar
5 replies · Started by Roland on February 13, 2018
Hi everybody,
on a one page site I want to hide the section id in the address bar of the user's browser.
For example, in the menu an item is linked to #about. When the user clicks, he jumps to the section "About". So far, so good.
But I don't want the ID to be shown in the user's address bar like this: "http://mysite.com/#about".
I wish the user could only see this: "http://mysite.com", regardless of the section he jumped.
My site should work like this one: http://www.mfw-design.com/
Any ideas, preferably without js or php? But if it's only possible with js or php, I will bite the bullet. :-)
Roland
Hi there,
Check this thread for some info: https://generatepress.com/forums/topic/remove-anchor-links-from-url/
Hi Leo,
thank you for your reply and sorry, I didn't find that thread.
I will have a look at this strange stuff on stackoverflow ...
Roland
No problem! Not an easy one to find.
Hi everybody,
I got it and I don't need JS or PHP.
The plugin Page Scroll to ID removes anchor links from the url in the address bar (optional).
And by the way, it also highlights the menu-item of the section currently visible.
I just wanted to share this ...
Thanks for sharing :)