[wp-trac] [WordPress Trac] #13818: There should be index pages for custom post types

WordPress Trac wp-trac at lists.automattic.com
Thu Oct 14 11:38:43 UTC 2010


#13818: There should be index pages for custom post types
----------------------------+-----------------------------------------------
 Reporter:  frankieroberto  |       Owner:  nacin      
     Type:  task (blessed)  |      Status:  accepted   
 Priority:  normal          |   Milestone:  3.1        
Component:  Template        |     Version:  3.0        
 Severity:  normal          |    Keywords:  needs-patch
----------------------------+-----------------------------------------------

Comment(by nacin):

 Replying to [comment:34 mikeschinkel]:
 > Sorry, I can't hold my thoughts on this.  If you have a website with a
 list of products, what does the term ''"Product Archive"'' mean?  In
 business it typically means product you no longer sell.  How about a site
 for movies; what does a ''"Movie Archive"'' mean?  Frankly, I can't think
 of what its relevance would be on the web.

 I agree with you.

 This is in the code, not the theme. Nowhere does the theme need to say
 "Product Archive." archive.php is the default catch-all for everything
 that is not singular, everything that is not home. Template hierarchy
 diagrams are very clear on this. It made sense to branch off archive
 templates the same way we branched off singular templates. We had
 single.php. Now we also have single-$post_type.php, and toggled by
 is_singular(). We had archive.php. Now we have archive-$post_type.php, and
 toggled by is_archive().

 People are familiar with the template hierarchy. I have added another step
 to the existing template hierarchy, following what we did in 3.0 with
 singular templates, versus adding an entire branch.

 I'm not putting my foot down on 'archive'. Personally, I don't care. I
 wanted this to be a non-invasive patch so I went with consistency on what
 we had.

 Replying to [comment:32 scribu]:
 > I don't think the 'archive' and 'feed' options should be in the
 'rewrite' array simply because they have nothing to do with rewrites.

 I don't see much of a problem with pulling those out of 'rewrite'. Only
 issue, is that one has a dependency of 'slug', which was already there.

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


More information about the wp-trac mailing list