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

WordPress Trac wp-trac at lists.automattic.com
Fri Oct 15 05:11:42 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:          
----------------------------+-----------------------------------------------

Comment(by nacin):

 Things that come to mind:

  - Way to differentiate between pre-3.1 archive.php usage, and expanded
 archive.php usage -- that is, is_post_type_archive() (how would we handle
 post_type=post?). Debating whether we want a new query flag and make the
 difference more pronounced, or if it's best to be as agnostic as possible.
 is_post_type_archive() sounds like all we need is `! is_archive('post')`,
 maybe we leave it at that?

  - Functions for links to the archive page, as well as feed links.

  - Nav menu integration. I hate wanting to even touch this, but a simple
 solution might be to add a post type index checkbox to the top of View All
 for that post type, if that post type supports archives. Precedent here
 would be for the "Home" link on the Pages pane. This would however cause
 some additional hacking as it would be a completely new type of menu item,
 assuming we don't use custom links (and we wouldn't want to for
 ancestor/descendant reasons). Patches welcome but I don't see this
 happening.

  - post_type_archive_title() sounds like it would just wrap
 post_obj->labels->name. So we just need to figure out what the best name
 would be for the function. And use it in wp_title().

  - Body classes. Can anyone think of other templating aspects I'm missing?

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


More information about the wp-trac mailing list