#20678 closed defect (bug) (invalid)
Custom post type 'name' is slug instead of plural label
Reported by: | thomask | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.4 |
Component: | General | Keywords: | |
Focuses: | 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)
#2
@
12 years ago
- 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
- term archive -> term object (not taxonomy object)
If we had such a thing as taxonomy archives (#17567), 'name' would be the taxonomy slug, as expected.
Note: See
TracTickets for help on using
tickets.
sorry, the last sentence is wrong, post_type_archive_title returns it right (title, not slug)