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

WordPress Trac wp-trac at lists.automattic.com
Wed Oct 26 19:24:13 UTC 2011


#19063: Custom post_types and get_template_part
-------------------------+------------------------------
 Reporter:  impleri      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Template     |     Version:
 Severity:  minor        |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------

Comment (by impleri):

 Is that really necessary? If a template author creates a template file of
 `archive-magical_mystery_type.php` and loads
 `get_template_part('archive')` on a post with `my_own_custom_type`, why
 should this assume the template file in question doesn't handle
 `magical_mystery_type` less than `archive.php` does? One would think that
 if a template author goes out of her way to create an archive page for a
 custom post_type, that file will work for that custom post_type better
 than the plugin author's default.
 Further, all of this still employs WordPress's own process and template
 logic (e.g. `locate_template`) with the single addition of allowing plugin
 authors a last-stop attempt at outputting their templates without using
 get_content, [http://stackoverflow.com/questions/4647604/wp-use-file-in-
 plugin-directory-as-custom-page-template/4975004#4975004
 template_redirect], or template_include -- each which again make it
 difficult to adjust for different themes (in their own peculiar way).

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


More information about the wp-trac mailing list