[wp-trac] [WordPress Trac] #19063: Custom post_types and get_template_part

WordPress Trac noreply at wordpress.org
Sat Aug 24 07:57:00 UTC 2013


#19063: Custom post_types and get_template_part
-------------------------+------------------------------
 Reporter:  impleri      |       Owner:
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Template     |     Version:
 Severity:  minor        |  Resolution:  wontfix
 Keywords:  has-patch    |
-------------------------+------------------------------
Changes (by c3mdigital):

 * keywords:  has-patch 2nd-opinion => has-patch
 * status:  new => closed
 * resolution:   => wontfix


Comment:

 `get_template_part()` Is meant to be a simple tempting function that gets
 a template part.  This complicates our template hierarchy.  Couldn't you
 do basically the same thing in your archive.php file?  Put your function
 that returns the $slug-$type part then in your archive.php

 {{{
 $template = your_slug_type_function();
 get_template_part( $template. '-loop'  );
 }}}

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


More information about the wp-trac mailing list