[wp-trac] [WordPress Trac] #15078: Custom Loops in Twenty Ten

WordPress Trac wp-trac at lists.automattic.com
Sat Oct 9 01:51:43 UTC 2010


#15078: Custom Loops in Twenty Ten
--------------------------+-------------------------------------------------
 Reporter:  koopersmith   |       Owner:           
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  3.1      
Component:  Themes        |     Version:  3.0.1    
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------
Changes (by demetris):

 * cc: dkikizas@… (added)


Comment:

 If I understand and remember correctly (I will have to look at the code),
 the second argument of {{{get_template_part}}} only makes sense if it
 offers an option of finer control.

 To give an example, in Daryl’s patch I would use:

 {{{get_template_part('loop-page', '1col');}}}

 for the single-column page templage, and just

 {{{get_template_part('loop-page');}}}

 for the main page template.

 Then users could make a ''loop-page-1col.php'' file to change the loop
 only for the single-column template.

 (By the way, why do single-view templates need a loop?  Doesn’t
 {{{the_post()}}} set up everything needed there?)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15078#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list