/**
* get_template
*
* @since 0.1
*/
function get_custom_post_type_template( $template ) {
global $post;
if ( $post->post_type == 'my_post_type' ) {
$template = dirname( __FILE__ ) . '/post-type-template.php';
}
return $template;
}
add_filter( 'template_include', 'get_custom_post_type_template' );
/* more filters (from http://codex.wordpress.org/Template_Hierarchy)
archive_template
author_template
category_template
tag_template
taxonomy_template
date_template
home_template
front_page_template
page_template
paged_template
search_template
single_template
attachment_template
*/