[wp-trac] [WordPress Trac] #13279: single.php in twentyten doesn't use `get_template_part()` to choose the loop template and breaks `in_the_loop` checks

WordPress Trac wp-trac at lists.automattic.com
Thu May 6 16:17:16 UTC 2010


#13279: single.php in twentyten doesn't use `get_template_part()` to choose the
loop template and breaks `in_the_loop` checks
--------------------------+-------------------------------------------------
 Reporter:  shawnparker   |       Owner:                                           
     Type:  defect (bug)  |      Status:  new                                      
 Priority:  high          |   Milestone:  Unassigned                               
Component:  Themes        |     Version:  3.0                                      
 Severity:  normal        |    Keywords:  twentyten, get_template_part, in_the_loop
--------------------------+-------------------------------------------------
 Is there any specific reason why?

 The current way that `single.php` is built negates using `in_the_loop` to
 detect whether we're in a loop context or not. This causes sidebars to
 think that they're in the loop. It seems like it would also have a
 detrimental effect on the new design scheme for implementing child themes.

 A simple switch to using `get_template_part('loop', 'single');` inside the
 single template appears to work fine, but I haven't done any serious
 debugging yet.

 There are minor verbiage changes in the post-meta display between
 `single.php` as it is and `loop.php`.

 I'm interested to know if this was an oversight or if it was a conscious
 decision (and what the reasoning was).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13279>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list