Support » Plugin: AMP » AMP support for custom post types

  • Hello,
    does this support custom post type?
    after having made minor adjustments, in my Google search console I see all the standard posts marked as “valid” but all the custom post types are not AMP versioned so they present many errors of course, since the AMP version looks not managed (there’s not actually a valid “site/cpt/url/amp” pattern URL. Do you have a solution for that?
    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • there are a lot of good tidbits in the readme markdown file. you basically do something like this.

    add_action( 'amp_init', 'amp_add_post_type_x' );
    function amp_add_post_type_x() {
         add_post_type_support( 'post_type_x', AMP_QUERY_VAR );
    }

    sorry I did not check the readme, thanks got it

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘AMP support for custom post types’ is closed to new replies.