Hi All, same problem.
Now I am using below code for load the template for my custom post type from my plugin folder.
function (My_Custom_Post_Type)_template($single_template) {
global $post;
if ($post->post_type == '{My_Custom_Post_Type}') {
$single_template = dirname( __FILE__ ) . '/templates/{My_Custom_Post_Type}-template.php';
}
return $single_template;
}
add_filter( "single_template", "{My_Custom_Post_Type}_template" );
How could I replace the above “single_template” filter.
How could I have use this {$type}_template?
Please help!
[Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]