[wp-trac] [WordPress Trac] #12105: Add support to get_single_template() for custom content types

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 31 23:33:33 UTC 2010


#12105: Add support to get_single_template() for custom content types
-------------------------+--------------------------------------------------
 Reporter:  ptahdunbar   |       Owner:     
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  3.0
Component:  Template     |     Version:  3.0
 Severity:  normal       |    Keywords:     
-------------------------+--------------------------------------------------
Changes (by nacin):

  * keywords:  has-patch =>
  * milestone:  Unassigned => 3.0


Comment:

 When an item is_singular(), that means it is is_page() || is_attachment()
 || is_single().

 If we go this route, and it looks like a good idea, then we need to
 consider an expansion of the
 [http://codex.wordpress.org/Template_Hierarchy template hierarchy] that
 spans all post types, including pages, attachments, and posts, to address
 various new template naming schemes.

 You should check out how the other get_*_template() functions work. None
 invoke $wp_query IIRC.

 It sounds like the best approach would be to create
 get_singular_template() that then does what it can and routes to
 get_page_template(), get_attachment_template(), and get_single_template()
 as necessary.

 Setting to 3.0 in line with #9674.

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


More information about the wp-trac mailing list