Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #13268

    zubin-parakh
    Participant

    Noob here, please forgive :)
    I am trying to include News Post types in the Amp Plugin.
    Here is the article I tracked down from AMP on how to do it, except I don’t know where to post the codes, LOL.
    https://github.com/Automattic/amp-wp/blob/master/readme.md#custom-post-type-support

    #13282

    Bartosz
    Keymaster

    According to the docs it should be enough to add this to your theme’s functions.php file:

    add_action( 'amp_init', 'xyz_amp_add_review_cpt' );
    function xyz_amp_add_review_cpt() {
        add_post_type_support( 'news', AMP_QUERY_VAR );
    }
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.