Assign a custom template to one or more post types

When you create a custom template in WordPress it will be available only to Pages by default. With this simple snippet, you can assign templates to one or more post types of your choice.


By declaring a ‘Template Post Type’ below the ‘Template Name’, you can assign your WordPress templates to multiple post types, including custom post types.

The ‘Template Post Type’ comment supports either a single value or a comma separated list of post type, such as in the example below:

/* Template Name: Full Width Page */
/* Template Post Type: post, page, product */

Adding this simple snippet will make your WordPress custom templates available to one or more post types that you specify.

A lightweight, intuitive WordPress theme to enable flexible developement.

  • Lighting-fast installer
  • Intuitive SASS structure
  • Bloat-free

Build with Barebones