• Hi,

    I built a website on the WordPress Platform about 6 months ago with some anchor links that pointed to specific areas on an FAQ page. The reason I did this was to direct the user to the relevant questions of the page they came from.

    Last week, the site owner contacted me that the ‘#tagname’ was being stripped off the end of the URL in Safari and thus breaking that functionality.

    I have done lots of research and have determined that this is because the WordPress set up is in its own subdirectory. Therefore, I need to change the Site URL to: https://www.example.com/wordpress to fix this issue. The problem here is that the website owner doesn’t want her page urls to say: https://www.example.com/wordpress/about

    Is there a different way to fix this issue? Or is there a way to change the Site URL but keep the /wordpress/ directory out of the public user’s address bar?

    I would love ANY help with this. Thanks!

Viewing 1 replies (of 1 total)
  • JustAsking

    (@catenacreations)

    I think I may have figured out the problem with the #tagname being stripped. Can’t help you with the subdirectory issue.

    I was trying to do this on my site’s home page, where the services boxes were built separately and you have to type in a link by hand. That doesn’t work.

    Add the anchor links in the code as you normally would.

    When you create the other link, do this:

    1) Open the page where the original link will be. Set the view of your page to be edited to Visual.
    2) Highlight the text you want to link, then click the Link icon.
    3) Use the search to find the page you want to link to and click it.
    4) BEFORE you click Add Link, click your cursor at the end of the link that appears. Type your anchor text here. It will look like this: https://mysite.com/my-page/#link
    5) Click Add link.
    6) Update the page and test it.

    When I tried it, NOTHING worked as long as I entered the code by hand. It worked only when I used WordPress’ linking system.

    In my case, I had to take my content out of the pre-formatted services boxes and just set everything up in columns. That worked for me, but it may not work for everyone.

    I have tried this in Safari, Firefox, Chrome on a Mac, and IE, Firefox, Chrome in Windows 7 (all latest versions). It worked on all. It also worked on my iPad and iPhone.

    I was going to post a screen shot but I don’t see the link anymore.

    My site is here: Catena Creations

    Click on one of the Learn More links at the bottom of the page.

Viewing 1 replies (of 1 total)
  • The topic ‘Named anchor tags being removed from URLs in Safari’ is closed to new replies.