[Support request] Remove anchor links from url

Home Forums Support [Support request] Remove anchor links from url

Home Forums Support Remove anchor links from url

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #266299
    Karim

    Howdy:)

    https://www.ht-installaties.nl/

    I just finished my first site with Elementor Pro and GP, and it’s a nice combination indeed.
    When i was building the one-page site on a subdomain and scrolled to a particular anchor, the URL stayed the same. But now that i moved to the main domain, the anchor becomes visible in the url. So when i scroll to contact, you see the url like this ht-installaties.nl/#contact

    is there a simple way to keep the anchor links out of the url as was before?

    If it’s too much trouble then dont bother, i’ll keep it like this. But if it’s easy (which i am sure is for you guru’s :p) then i really love the help:)

    Greets

    #266301
    Leo
    Staff
    Customer Support

    Not sure if it would be simple but maybe give the solution in this post a shot?
    http://stackoverflow.com/questions/5928435/append-remove-anchor-name-from-current-url-without-refresh

    #266303
    Karim

    i visted that site so many times, always with a quick run away cause too tough to understand haha.

    But i’ll check it out and see.
    Thanks:)

    #266418
    Tom
    Lead Developer
    Lead Developer

    You would definitely need to use javascript to achieve something like that. There’s some decent solution in the link Leo posted.

    #266433
    Karim

    I never added javascript to a site, so always good to learn.
    Can i use a hook for that, same way as i use for PhP scripts?

    #266601
    Tom
    Lead Developer
    Lead Developer

    You can use the wp_footer hook in GP Hooks, just wrap your JS in <script></script> tags.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.