1. Home
  2. Developer Docs
  3. Theming (AMP Theme Framework)
  4. Create Custom Template for post type and taxonomy in the AMP Theme Framework

Create Custom Template for post type and taxonomy in the AMP Theme Framework

To create pages in AMP Theme Framework click here.

Explanation for custom template for post type and Taxonomy.
archive-{post_type}.php
single-{post_type}.php

archive-{post_type}.php
If your custom post type were ‘product’, and/or query_var = “product”, AMP Framework would look for archive-product.php to display the archive of posts.

For more details check in WordPress template hierarchy

single-{post_type}.php
If your custom post type were ‘product’, and/or query_var = “product”, AMP Framework would look for single-product.php to display the single or permalink of the post.
Its Support single-{post_type}-{post_name_slug}, single-{$object->post_type}

For more details check in WordPress template hierarchy

For taxonomy also similar like: taxonomy-{taxonomy}-{slug}.php, taxonomy-{taxonomy}.php

Updated on February 12, 2018

Was this article helpful?

Related Articles

Add A Comment