Custom Post Template
Description
This plugin provides a drop-down to select different templates for posts from the post edit screen. The templates are defined similarly to page templates and will replace single.php for the specified post. This plugin will NOT switch the templates for the different posts in a listing page, such as a date or category archive; it will only affect the template used for single posts.
Post templates, as far as this plugin is concerned, are configured similarly to page templates in that they have a particular style of PHP comment at the top of them. Each post template must contain the following, or similar, at the top:
<?php
/*
Template Name Posts: Snarfer
*/
?>
First note: Page templates use 'Template Name:', whereas post templates use 'Template Name Posts:'.
Second note: You must have the custom post template files in your theme in the same directory as your index.php template file, not in a sub-directory.
If you want to implement the custom post templates on a custom post type, you can use the cpt_post_types filter. Here’s an example of adding the custom post template selector and metabox to the 'Movie' and 'Actor' custom post types. This code can be added to a plugin or to the functions.php file in your theme.
Other Notable Features
Here are a few other notable features of this free Custom Post Template plugin.
Contributors and developers
“Custom Post Template” is open source software. The following people have contributed to this plugin.
WPS
6.36
Average
Ratings
4.8 out of 5 | 43Version
1.5Last updated
8 years agoActive installations
10,000+WordPress version
3.4.2 or higherPHP version
or higherLanguages
0Tags
Post,Template,ThemeOther plugins you might like
Classic Editor
By WordPress.org
WPS
7.56
Very Good
1.2k+reviews
active installation
Tested with
6.9.1Yoast Duplicate Post
By Yoast
WPS
7.83
Very Good
525+reviews
active installation
Tested with
6.9.1Advanced Editor Tools
By Andrew Ozz
WPS
7.43
Very Good
350+reviews
active installation
Tested with
6.9.1Advanced Custom Fields (ACF®)
By WP Engine
WPS
7.47
Very Good
1.4k+reviews
active installation
Tested with
6.9.1Custom Post Type UI
By webdevstudios
WPS
7.39
Very Good
272+reviews
active installation
Tested with
6.9.1TablePress – Tables in WordPress made easy
By Tobias Bäthge
WPS
7.7
Very Good
4.6k+reviews
active installation
Tested with
6.9.1