All you have to do is create a simple called single-POSTTYPE.php (ig, single-books.php), so why do you need this plugin?
http://wordpress.org/extend/plugins/custom-post-type-template-redirect/
All you have to do is create a simple called single-POSTTYPE.php (ig, single-books.php), so why do you need this plugin?
http://wordpress.org/extend/plugins/custom-post-type-template-redirect/
The single-POSTTYPE.php option also works in child themes whereas the plugin only finds the file if it's in the main theme directory.
You should use locate_template() instead of TEMPLATEPATH to make it available to child themes.
Not the tidiest of code, but it works:
$testing = locate_template(array($wp->query_vars["post_type"] . '.php'));
if ( $testing <> "" ) {
$cptdt_template = $testing;
}else{
$testing = locate_template(array('t_' . $wp->query_vars["post_type"] . '.php'));
if ( $testing <> "" )
$cptdt_template = $testing;
}
This topic has been closed to new replies.