There should be index pages for custom post types
|Reported by:||frankieroberto||Owned by:||nacin|
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.
Change History (76)
7 years ago
- Cc yeswework added
- Component changed from General to Template
- Milestone changed from Unassigned to 3.0
- Priority changed from normal to high
- Version set to 3.0
- Owner set to nacin
- Status changed from new to accepted
- Type changed from enhancement to task (blessed)