Title: Custom Post Type issue
Last modified: September 15, 2016

---

# Custom Post Type issue

 *  [genericname](https://wordpress.org/support/users/genericname/)
 * (@genericname)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/custom-post-type-issue-6/)
 * This is the code I have currently. Am I missing something? The video page would
   not load if I add /amp to the url.
 *     ```
       add_action( 'amp_init', 'amp_cpt' );
   
       function amp_cpt() {
           add_post_type_support( 'video', AMP_QUERY_VAR );
       }
   
       add_filter( 'amp_post_template_file', 'amp_cpt_template', 10, 3 );
   
       function amp_cpt_template( $file, $type, $post ) {
           if ( 'single' === $type && 'video' === $post->post_type ) {
               $file = dirname( __FILE__ ) . '/templates/amp-cpt-template.php';
           }
           return $file;
       }
       ```
   

 The topic ‘Custom Post Type issue’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [genericname](https://wordpress.org/support/users/genericname/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/custom-post-type-issue-6/)
 * Status: not resolved