Opened 6 years ago
Last modified 3 years ago
#46614 assigned enhancement
Category/tag/taxonomy names on admin screens
Reported by: | Dianakc | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-patch needs-refresh |
Focuses: | Cc: |
Description
Hello, I'd like to suggest that when browsing categories, tags any taxonomies in general the admin screen display the taxonomy title/name somewhere preferably at the very top as I see that newbie users feel confused when browsing posts from a specific category/tag/taxonomy.
Examples:
When browsing the "Succulents" tag
When browsing the "Plants from Mexico" category
I also searched for some way to add this myself for some clients and can't find how to do so.
Thanks (sorry if this is out of scope/wrong place)
Attachments (1)
Change History (6)
#2
in reply to:
↑ 1
@
4 years ago
Hello,
Sorry but you're confusing taxonomies with custom post types, the ticket is about the page titles, taxonomy pages should display the taxonomy they are showing, that's all.
#3
@
4 years ago
@Dianakc Sorry for the confusion. Mentioning the pages and custom post type names is not necessarily relevant.
But my point was that the headings for post listing screens always match the post type, even when the posts in that list are restricted to one category, tag or other taxonomy. Adding the selected taxonomy name there should require a patch to wp-admin/edit.php
.
#4
@
4 years ago
- Keywords has-patch needs-testing added; needs-patch removed
Hi @Dianakc and @sabernhardt!
I think we should be able to do this by appending get_the_archive_title();
to the end of the heading. That way we can still see the Post Type, but also what taxonomy we are browsing. If there is no taxonomy (ie the top-level page) then it returns the word "Archives" which can then be filtered out.
Could probably do with some e2e to check I haven't missed any edge cases.
#5
@
4 years ago
- Keywords needs-refresh added; needs-testing removed
@mikejdent Thanks for creating a patch! A few tips for next time:
- Use classes instead of style attributes
- Use spacing according to PHP coding standards
- Pay attention to translation functions:
__( 'Archives' )
instead ofArchives
If the filter information does not need to be inside the heading, we could use the same <span class="subtitle">
that currently shows search queries after the Add New link.
If added inside the heading, the class could be reused there with a different margin in that context (and perhaps a small
tag instead of span
).
I am having some trouble with the archive title when using the date filter, at least on the Pages screen.
@Dianakc Hi and thanks for the ticket!
The heading text is rather strict in
wp-admin/edit.php
:So in U.S. English it's always "Posts" for standard posts, "Pages" for the pages, and the main (plural) label for any custom post type.
It could be good to create a filter for customizing the heading text.