Show different single post template for all posts inside a specific Post Type
-
Currently I use this code to display a different single page template based on the category it is posted in:
<?php
$post = $wp_query->post;
if ( in_category(‘4′) || in_category(’59’) ) {
include(TEMPLATEPATH . ‘/sinlge-temp1.php’);
}
elseif (in_category(‘5’)) {
include(TEMPLATEPATH . ‘/single-temp2.php’);
}
else {
include(TEMPLATEPATH . ‘/single-default.php’);
}
?>But Now I need a way that it will call up a different single file, if it is a post posted inside a Custom Post Type Called “Moviess”
Any way to do this?
The topic ‘Show different single post template for all posts inside a specific Post Type’ is closed to new replies.