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

WordPress Trac wp-trac at lists.automattic.com
Thu Jun 10 12:32:15 UTC 2010


#13818: There should be index pages for custom post types
-----------------------------+----------------------------------------------
 Reporter:  frankieroberto   |       Owner:            
     Type:  feature request  |      Status:  new       
 Priority:  normal           |   Milestone:  Unassigned
Component:  General          |     Version:            
 Severity:  normal           |    Keywords:            
-----------------------------+----------------------------------------------
 Currently, if you create a custom post type, and have rewrites enabled, it
 will generate posts with URLs along the lines of /post-type/post-name.
 However, if you try to access an index page at the obvious URL of /post-
 type you'll get a 404, as Wordpress will try to find a page with that
 slug.

 Whilst it's possible to manually create a page with that slug name, and
 then use a custom template to generate a query bringing back the most
 recent posts with a set post-type, it'd be useful if this was built-in
 (and I suspect it'd be the expected behaviour).

 Suggested function to use would be is_post_type() which uses the template
 post-type-slug.php falling back to archive.php if that's not present.

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


More information about the wp-trac mailing list