• Resolved lufyl

    (@lufyl)


    Hello,

    I wanted to know if it is possible to disable the “rewriting” of my links in an amp single page. For example if i have internal links like “<a href="https://example.fr/myPostTitle/">My post</a>” it gets rewrited when i check in the source code to “<a href="https://example.fr/myPostTitle/?amp" rel="amphtml">My post</a>

    Basically I want to be be directmly redirected to the non-amp post wwhen I click I link when I am on a amp post.

    Thank you

    • This topic was modified 3 years, 11 months ago by Yui.
    • This topic was modified 3 years, 11 months ago by lufyl.
    • This topic was modified 3 years, 11 months ago by lufyl.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Milind More

    (@milindmore22)

    Hello @lufyl

    If you are looking to disabled amp to amp linking you may want to try the following code in your theme’s functions.php

    add_action('amp_to_amp_linking_enabled', '__return_false');

    If you are looking to filter out a specific URL you may want to check out amp_to_amp_linking_element_excluded filter, our guide has more info on it.

    Also, You may want to check our doc for more references.

    • This reply was modified 3 years, 11 months ago by Milind More.
    Thread Starter lufyl

    (@lufyl)

    Thank you very much !
    amp_to_amp_linking_enabled was exactly what I needed. I searched on your doc but didn’t find it. Very usefull thank you again !

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable amp to amp links’ is closed to new replies.