I am not sure if this will work for you but it is worth a shot. I use this all the time for my custom post types when they require a special template.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | // Template selection Defines the template for the custom post types. function my_template_redirect() { global $wp; global $wp_query; if ($wp->query_vars["post_type"] == "your_custom_post_type") { // Let's look for the your_custom_post_type_template.php template // file in the current theme if (have_posts()) { include(TEMPLATEPATH . '/your_custom_post_type_template.php'); die(); } else { $wp_query->is_404 = true; } } } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.