Viewing 5 replies - 1 through 5 (of 5 total)
  • @mbeerli thanks for the inquiry!

    Just to confirm I understand correctly: you are seeing redirections to the AMP version of the category pages at the footer in the AMP version?

    This may be due to AMP-to-AMP linking which is currently enabled on your posts.

    You can add this filter to your active theme’s functions.php file or a custom plugin to disable that feature:

    add_filter( 'amp_to_amp_linking_enabled', '__return_false' );

    Thread Starter mbeerli

    (@mbeerli)

    correct.
    I use the Graphene Theme
    and your AMP settings: Reader Mode with AMP Legacy
    I am not aware that I can add that filter.
    Where would I do that?

    • This reply was modified 4 years, 5 months ago by mbeerli.

    @mbeerli thanks for your reply!

    As mentioned, you can add this filter to your active theme’s functions.php file (ideally in a child theme so it doesn’t get overwritten by updates) or in a custom plugin. There are also WordPress plugins available that you can use to add code snippets to your site if that helps.

    Thread Starter mbeerli

    (@mbeerli)

    Before I add this filter, can you tell me how this would look like?
    Just reading about your add_filter option it looks more like a work around then an actual fix.

    By including the filter any internal links will be to the canonical (non AMP) version of your content in reader or transitional mode.

    You’ll find out more on this filter on the plugins GitHub repository, with AMP-to-AMP linking being applied by default in transitional mode from earlier versions of the plugin:
    https://github.com/ampproject/amp-wp/issues/4913

    Let us know if you have any further queries on this.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Redirect 301 on categories links on amp post’ is closed to new replies.