Plugin Directory

Custom Post Template

Provides a drop-down to select different templates for posts from the post edit screen. The templates replace single.php for the specified post.

Download Version 1.4

= Developers

=

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 below of adding the custom post type selector to the "Movie" and "Actor" custom post types. You can also add this code to the functions.php file in your theme.

/**
 * Hooks the WP cpt_post_types filter 
 *
 * @param array $post_types An array of post type names that the templates be used by
 * @return array The array of post type names that the templates be used by
 **/
function my_cpt_post_types( $post_types ) {
    $post_types[] = 'movie';
    $post_types[] = 'actor';
    return $post_types;
}
add_filter( 'cpt_post_types', 'my_cpt_post_types' );

Requires: 2.9 or higher
Compatible up to: 3.2.1
Last Updated: 2010-6-18 Downloads: 58,119

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(54 ratings)

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

Log in to vote.

50,2,1 0,1,0
100,4,4
7,14,1
36,14,5 0,1,0 100,1,1
100,1,1 43,7,3 50,2,1
100,1,1 86,7,6
75,4,3
100,1,1
100,3,3 100,1,1
0,1,0
40,5,2
100,3,3
0,1,0
50,2,1
100,1,1
100,2,2
100,4,4 85,13,11
0,1,0 100,4,4