#20678 closed defect (bug) (invalid)
Custom post type 'name' is slug instead of plural label
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 3.4 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
If you look into get_queried_object() object on build-in archive pages, the object->name contanins plural label of that categoriy, e.g. 'My news'.
If you do the same on CPT, it contains slug, e.g. "my-news"
The same is returned when you do post_type_archive_title() - so slug for CPT, Plural name for categories.
Change History (4)
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
You're comparing apples to oranges:
- post type archive -> custom post type object
- taxonomy archive -> term object (not taxonomy object)
If we had such a thing as taxonomy archives (#17567), 'name' would be the taxonomy slug, as expected.
Version 0, edited 13 months ago
by scribu
(next)
To clarify:
- term archive: /categories/my-news/
- taxonomy archive: /categories/ (not implemented)
Note: See
TracTickets for help on using
tickets.

sorry, the last sentence is wrong, post_type_archive_title returns it right (title, not slug)