Support » Plugin: AMP for WP - Accelerated Mobile Pages » Jump / Anchor Links Broken

  • I have a client that has created hundreds of posts with anchor link on the post via the following:

    Example Link:
    <a href="#example">Jump to Example Link</a>

    Example Anchor:
    <a id="example"></a>

    My guess is they’ve confused the example found here and made both the link & the anchor A tags:

    Technically this works on desktop, the links jump as intended. But with AMP for WP enabled it strips those empty links (as it likely should).

    I’m looking for any advice on how we could fix this issue, given the client has thousands of jump links throughout their site. (Acknowledging this isn’t an AMP for WP issue, but a client issue).


Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor ampforwp


    Hello @dcio

    Can you please add href attribute in the tag and check if it works or not, because if the href attributes do not mention in the amp version then the link will be stripped.

    So can you please add href attribute in the anchor tag and let me know if it works or not.

    I noticed that if the urls in the href are relative that the link is stripped in the amp pages. My site is small enough that this isn’t a huge deal but might want to look at not stripping relative urls e.g. href=”../myLinkedInternalPage”

    Check that, it looks like beaver builder (the go daddy website builder) auto converts hrefs to relative on save. It’s a losing battle to keep the links fully qualified. The amp link conversion code needs an update to accommodate the relative URL’s!

    Plugin Contributor ampforwp


    Hi @tnhsaesop,

    Thank you for the information, could you share the proper URL with me so that I can check how it’s working in NonAMP and AMP Versio and where exactly it’s breaking? and then give you an update on it?

    I had to uninstall the plugin, it wasn’t meeting my needs. Sorry, good luck!

    Plugin Contributor ampforwp


    If you provide us the URL to check your issue then we can help you in fixing those error and make sure it will be according to your need but if you don’t provide us the URL and then how can we understand and help you in fixing?

    This should work but there is no way to add IDs through AMPforWP. This is problematic.

    <a href="#my-section">Jump to my section</a>

    <div id="my-section">...</div>

    Plugin Contributor ampforwp


    Hi @skunkworks,

    We’ve created a ticket on this issue in our GitHub repo. We’ve already fixed the issue and forwarded to the testing department. Once the testing & review is done. We’ll add this in the upcoming updates.

    However, if you want to fix the issue immediately, please contact us directly on Our technical team will debug and fix the issue on your end.

    Hope it helps.

    Plugin Contributor ampforwp


Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Jump / Anchor Links Broken’ is closed to new replies.