• Resolved chillmen

    (@chillmen)


    Hi,
    I’m using the reader mode with the legacy theme, it seems that custom post type archives are not working with amp, example file: archive-custom_post_type.php

    i’ve searched for a solution here Handling AMP Legacy themes
    I found the last code in this page for custom templates, but could not make it work. Should i move the template file to a directory “templates” inside amp folder or change the link to child theme directory ?

    Thanks in advance for your help

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Milind More

    (@milindmore22)

    Hello @chillmen

    As you’re using AMP in reader mode with a legacy theme your homepage and archive pages don’t have AMP versions. Only singular content types have AMP versions available.

    You can use amp_post_template_file filter for adding singular templates for the custom post type

    You may also choose a different AMP reader theme from the list of compatible themes, which will allow you to use the AMP on the archive pages.

    You can also add your own theme as reader mode theme using AMP:true Our site has more info on it.

    Thread Starter chillmen

    (@chillmen)

    Hi,
    I could not use amp_post_template_file because could not find an example of how to use this code.
    I will use a compatible amp theme and move to transitional mode, look like better solution.

    Thanks for your help

    Plugin Support Milind More

    (@milindmore22)

    Hello @chillmen

    You can find an example for amp_post_template_file here

    Glad to know you are moving to a compatible theme, feel free to browse through our ecosystem for compatible themes and plugins

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘AMP and custom post type archive’ is closed to new replies.