[wp-hackers] Block auto formatting of post content?

Jason Webster jason at intraffic.net
Tue Aug 19 03:08:37 GMT 2008

Stephen Rider wrote:
> 2) Is there a way for a plugin to allow use of a page template that is 
> located in the plugin folder, or MUST it be moved to the theme folder?
Here's a quick copy and paste from something that'll help you on your way:

add_action('template_redirect', array(&$this, 'template_redirect'));


    public function template_redirect() {
        global $wp_query;
        if($this->is_contest()) {
            include(TEMPLATEPATH . '/contest.php');
        } elseif ($this->is_entry() && is_single()) {
            include(TEMPLATEPATH . '/entry.php');
        if($wp_query->query_vars['pagename'] == 'contest') {
            include(TEMPLATEPATH . '/contest-index.php');

More information about the wp-hackers mailing list