[wp-testers] Custom Post Type + many template
Lox
lox.dev at knc.nc
Sat May 29 23:10:14 UTC 2010
> 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'));
Hi,
Well nothing new here. But how can we, using a plugin, provide to wp
admins the ability to choose between a set of template for a specific
post-type ?
The solution u gave doesn't provide that.
Regards.
--
Lox
lox.dev at knc.nc
More information about the wp-testers
mailing list