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

WordPress Trac wp-trac at lists.automattic.com
Mon Apr 12 08:05:32 UTC 2010


#12974: Add support to get_archive_template() for custom content types
-------------------------+--------------------------------------------------
 Reporter:  johnonolan   |       Owner:            
     Type:  enhancement  |      Status:  new       
 Priority:  normal       |   Milestone:  Unassigned
Component:  Post Types   |     Version:            
 Severity:  normal       |    Keywords:            
-------------------------+--------------------------------------------------
 Relevant to #12105[[BR]]
 [[BR]]
 It would be great if custom content types could have their own category
 page templates.[[BR]]
 [[BR]]
 Why? Primarily because if I have a custom content type, then I want people
 to be able to browse that content type, and I don't want them to browse
 the content type with the same styling and format as normal blog
 entries.[[BR]]
 [[BR]]
 For example if I have a custom content type of "books", then I want a
 category page for books with a loop that returns all of my "books" in a
 custom format.[[BR]]
 [[BR]]
 Continuing with this example, if I write a post called "A Book" then the
 slug becomes example.com/books/a-book/ however /example.com/books/ returns
 a 404. This is where I'd like to see archive-post_type.php kick in.[[BR]]
 [[BR]]
 The new approach:[[BR]]
 * archive-post_type-slug.php[[BR]]
 * archive-post_type-id.php[[BR]]
 * archive-post_type.php[[BR]]
 * archive.php[[BR]]
 [[BR]]
 This seems like a fairly obvious one to me (in place of hacking around
 with pages and custom-page-templates)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12974>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list