You can use the template redirect to include file in your plugins directory.
// Template selection
function template_redirect()
{
global $wp, $wp_query;
if ($wp->query_vars["post_type"] == "abcd")
{
get_header();
// include your custom processing code here
get_sidebar();
get_footer();
die();
} // end if to determine if we're doing anything with this
redirect
}
add_action("template_redirect", array(&$this, 'template_redirect'));
On Mon, May 3, 2010 at 6:34 PM, unsalkorkmaz <[email protected]> wrote:
> Hi,
> I want to use custom post types but i couldnt find "how to add custom
> post type template support from plugin directory"
>
> Basically lets say i want to have "abcd" named post type. I dont want
> to put a file on every template and i want to define single-abcd.php
> file location in plugin directory without editing template files. Is
> it possible?
> _______________________________________________
> wp-testers mailing list
> [email protected]
> http://lists.automattic.com/mailman/listinfo/wp-testers
>
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers