[wp-trac] [WordPress Trac] #18375: Post type templates

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 10 20:49:27 UTC 2011


#18375: Post type templates
------------------------------------+------------------------------
 Reporter:  johnbillion             |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Themes                  |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |
------------------------------------+------------------------------
Changes (by johnbillion):

 * keywords:  dev-feedback => dev-feedback has-patch


Comment:

 [attachment:ticket:18375:18375.patch Patch] that adds per-post-type
 template functionality to all post types.

 A template in a theme can now include an optional 'Template Type' header
 that specifies the post type that the template is for. If the header isn't
 present, the template is treated as a page template.

 Example:

 {{{
 /*
  * Template Name: Amazing Event
  * Template Type: event
  */
 }}}

 This header placed in a template file will make the Amazing Event template
 available to the event post type, meaning it can be selected in the
 Template dropdown on the post editing screen.

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


More information about the wp-trac mailing list