[wp-trac] [WordPress Trac] #16128: WordPress Template System Override

WordPress Trac wp-trac at lists.automattic.com
Thu Jan 6 22:14:57 UTC 2011

#16128: WordPress Template System Override
 Reporter:  pearsonified                 |       Owner:
     Type:  feature request              |      Status:  new
 Priority:  normal                       |   Milestone:  Future Release
Component:  Themes                       |     Version:  3.1
 Severity:  normal                       |  Resolution:
 Keywords:  has-patch 2nd-opinion close  |

Comment (by duck_):

 Replying to [comment:8 pearsonified]:
 > Nacin, the problem with not changing anything is that you cannot prevent
 the rest of the template-loader.php file from running, as Nathan mentioned
 in his response to duck_ above.
 > Any thoughts on that end of things?

 "include a template and die"

 add_action( 'template_redirect', 'this_is_a_silly_example' );
 function this_is_a_silly_example() {
     if ( is_single() ) {
         include( TEMPLATEPATH . '/path/to/my/template.php' );

Ticket URL: <http://core.trac.wordpress.org/ticket/16128#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list