[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 00:25:10 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 greenshady):

 These might belong in a new ticket, but I wanted to bring them up here
 before creating something new in case these were already part of the plan.

 I've already started playing around with post type archives, so I've been
 looking for things that we would need to use within themes.

 '''Archive title'''

 We would need something like `archive_title()` or
 `post_type_archive_title()`.  This could also be used in `wp_title()` to
 show the title for the page.

 '''Archive link'''

 We would need something like `get_archive_link()` or
 `get_post_type_archive_link()`.  This would allow us to link specifically
 to the archive page.

 '''Conditional tag'''

 I know we have `is_archive()` and can check for specific post types with
 it, but we need a conditional tag to check if viewing a post type archive
 page.  Something like `is_post_type_archive()` would work better because
 we could check if we're viewing *any* post type archive, not just a
 specific one.  Otherwise, you'll find yourself doing checks like this:

 /* If viewing a post type archive. */
 if ( is_archive() && get_query_var( 'post_type' ) )

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

More information about the wp-trac mailing list