• Hi all!

    Does anyone know how to solve the problem with anchor links not working in Safari?

    I’m using a template that has one main scrolling page, but also single pages for the blog post pages. When I go to a single blog post and click the a link in the navigation to go back to the main site, all links are redirected to the homepage. I do have the site in a sub domain, so it’s not in the root folder, which I have read one response that this could actually be causing it? I also might have a rewrite script in theme, but I’m not familiar with scripts and haven’t tried to change anything but the URL links.

    Again, this is only happening in Safari, so Firefox, IE and Chrome are all working fine.

    Any thoughts or ideas would be greatly appreciated! Thank you!

Viewing 11 replies - 1 through 11 (of 11 total)
  • I don’t know of any Safari specific issues – have you tried clearing your cache?

    Thread Starter ruby295

    (@ruby295)

    Yes. Strange, when I clear the cache on the post page the links work, but I can’t expect people to clear their caches on the blog post page.

    Thread Starter ruby295

    (@ruby295)

    Still not able to get this fixed. Any suggestions?

    For example:
    <a href="www.example.com/#blog">BLOG</a>
    Does not work in Safari.However the same link works fine in Firefox, Chrome and IE.

    Is there a way to write the URL that’s better for Safari?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    How valid is your markup?
    https://validator.w3.org

    Thread Starter ruby295

    (@ruby295)

    On the blog page, there’s a couple duplicated IDs. Would that cause it?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Is this Safari issue specific to your theme?

    Thread Starter ruby295

    (@ruby295)

    It’s only in Safari. I tested the theme example before I implemented it and the example theme did work fine in Safari.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Could you try deactivating all plugins and switching to the Twenty Thirteen theme to try to narrow down the issue?

    Thread Starter ruby295

    (@ruby295)

    Will that remove all the changes to the theme I’ve made?

    Thread Starter ruby295

    (@ruby295)

    They have a lot of different theme options and they have a spot where you can enter in your own CSS. So I want to make sure all those settings and added CSS changes are there when I switch back the theme.

    JustAsking

    (@catenacreations)

    I think I may have figured this out.

    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 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Anchor Links not working in Safari’ is closed to new replies.