Make WordPress Core

Opened 7 weeks ago

Last modified 5 weeks ago

#65022 accepted enhancement

Posts list: replace (no title) filler when a title isn't set with something more useful.

Reported by: annezazu's profile annezazu Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 7.1 Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch
Focuses: administration Cc:

Description (last modified by sabernhardt)

Pulled from here after @matt shared it as an area to improve:
http://scripting.com/2026/04/03.html#a140913

While we could show first N characters of a post when title is empty, there are also other ideas to consider to both still reflect a post title is missing but to make it easier for the person skimming to know what the post is likely about. Speaking personally, I like to see (no title) or some indication a title is missing so I can fill in.

Let's discuss ideas and implement a solution based on the discussion.

Attachments (11)

65022.diff (540 bytes) - added by sabernhardt 7 weeks ago.
proof of concept for showing excerpts in the Compact view when the post has no title
show-excerpt-in-compact-view.png (58.8 KB) - added by sabernhardt 7 weeks ago.
proof of concept: excerpt showing for post without a title in Compact view
before.png (477.5 KB) - added by Joen 6 weeks ago.
Present state, for comparison
after-proposal.png (496.4 KB) - added by Joen 6 weeks ago.
A proposal for an implementation
italic.png (502.3 KB) - added by Joen 6 weeks ago.
Italic excerpt-based placeholder title
italic-no-title.png (504.1 KB) - added by Joen 6 weeks ago.
Italic excerpt-based placeholder title, and "(no title)"
no title first in italics.png (30.6 KB) - added by annezazu 6 weeks ago.
No title listed first before excerpt in italics
IMG_8296.png (583.2 KB) - added by JeffPaul 5 weeks ago.
All Pages, compact view
IMG_8297.png (556.4 KB) - added by JeffPaul 5 weeks ago.
All Pages, extended view
IMG_8298.png (542.2 KB) - added by JeffPaul 5 weeks ago.
All Posts, compact view
IMG_8299.png (613.3 KB) - added by JeffPaul 5 weeks ago.
All Posts, extended view

Change History (24)

#1 @sabernhardt
7 weeks ago

#65023 was marked as a duplicate.

#2 @sabernhardt
7 weeks ago

  • Description modified (diff)
  • Milestone changed from Awaiting Review to Future Release
  • Summary changed from Posts list: replace (no title) filler when a title isn't site with something more useful. to Posts list: replace (no title) filler when a title isn't set with something more useful.

@davewiner shared this on #65023:

In the Posts list, if an item doesn't have a title, (no title) in place of the title isn't helpful, and makes it difficult when a page has lots of singular posts.

Suggested solution: Grab the first N chars of the body, or first sentence (easy with regex) or add a tool tip with the same text.

I write a lot of "singular" posts, ie posts without titles.

Posts list in Compact view

@sabernhardt
7 weeks ago

proof of concept for showing excerpts in the Compact view when the post has no title

@sabernhardt
7 weeks ago

proof of concept: excerpt showing for post without a title in Compact view

#3 @sabernhardt
7 weeks ago

Extended view (excerpt mode) already can show standard post excerpts in the posts list. With a small edit to the conditions, the Compact view could show excerpts for any posts that lack a title.

  • That still notifies people who need titles for every post when the title is missing.
  • In a way, it ignores the user's view preference, because more information should help in this situation.

The image includes three posts:

  1. Post without a title but with content, which shows the excerpt.
  2. Post with a title and with content, which shows the title without adding the excerpt.
  3. Post without a title or an excerpt because the post content has no text (only a Search block).

#4 @SergeyBiryukov
6 weeks ago

  • Milestone changed from Future Release to 7.1
  • Owner set to SergeyBiryukov
  • Status changed from new to accepted

@Joen
6 weeks ago

Present state, for comparison

@Joen
6 weeks ago

A proposal for an implementation

#5 follow-up: @Joen
6 weeks ago

I agree with this issue, and would love to see small improvements land in 7.1. The use case feels clear, and the path forward seems relatively straight too; there's even precedence in P2.

A question to be mindful of, however: does the auto-generated title actually get saved as title metadata to the post? If yes, does it change the slug from what would've otherwise simply been an incrementing post-ID?

The alternative would be to make this a Posts-list screen visual change only: if no title is set, use the first n words from the post and end with an ellipsis, but otherwise keep the title metadata empty, the cpt slug unchanged.

Attached two draft sketches of a before and after, for consideration.

#6 in reply to: ↑ 5 @mcsf
6 weeks ago

Replying to Joen:

The alternative would be to make this a Posts-list screen visual change only: if no title is set, use the first n words from the post and end with an ellipsis, but otherwise keep the title metadata empty, the cpt slug unchanged.

From what I understood of Matt's and Anne's report, it's more of a visual change, not an attempt to auto-generate titles. The consequences of that (IMO) are that it should remain clear that the post lacks a title, and that the excerpt/preview of the content is just that: a preview, or a placeholder.

I'm not a designer, but I think the solution ought to look a bit more like Stephen's concept, but on a single line (to honour Compact View). It could be a string of text that tries to fill the available space in the row's cell but gets clipped so as not to interfere with the other fields (Author, etc.).

#7 follow-up: @Joen
6 weeks ago

I should've added that my (semi-strong) preference was also to keep the post title-less, and the slug unmodified.

I'm not sure that showing an excerpt in absence of a title is going to be a good solution, though; it will create a different rhythm in the list with visual rivers. And from Dave's post, it simply mentions the title. I think the expectation from web-apps of today (think Docs, etc) is that items have titles that you can customise if you want to. In that sense, I'd think whatever we show should use the same visual area of the list. Your point about making it clear it's a title-less post is well made, though. Let me attach some experiments.

@Joen
6 weeks ago

Italic excerpt-based placeholder title

@Joen
6 weeks ago

Italic excerpt-based placeholder title, and "(no title)"

#8 in reply to: ↑ 7 @mcsf
6 weeks ago

Replying to Joen:

Your point about making it clear it's a title-less post is well made, though. Let me attach some experiments.

Thanks for them. AFAIC they could be something to try, but I'd love to get other people's feedback.

@annezazu
6 weeks ago

No title listed first before excerpt in italics

#9 @annezazu
6 weeks ago

I'd prefer the (no title) first then the first sentence as shown above. To me, without it, it becomes harder to skim which posts don't have titles.

#10 @Joen
6 weeks ago

I'd prefer the (no title) first then the first sentence as shown above. To me, without it, it becomes harder to skim which posts don't have titles.

That works for me, and then we wouldn't need any italicising.

#11 @mindctrl
6 weeks ago

Related to previous ticket regarding titles: https://core.trac.wordpress.org/ticket/45516

This ticket was mentioned in PR #11553 on WordPress/wordpress-develop by @sabernhardt.


5 weeks ago
#12

  • Keywords has-patch added

If the post/page has no title and the excerpt is not already showing, this

  • Adds a trimmed excerpt to post title link, and the checkbox label matches the link text.
  • Adds optional styling for the trimmed excerpt.

Trac 65022

Use of AI Tools: none

@JeffPaul commented on PR #11553:


5 weeks ago
#13

Tested via Playground and this works as expected for Posts and Pages, noting the excerpt/first bit of page content shows only on the Compact view and not on the Extended view.

@JeffPaul
5 weeks ago

All Pages, compact view

@JeffPaul
5 weeks ago

All Pages, extended view

@JeffPaul
5 weeks ago

All Posts, compact view

@JeffPaul
5 weeks ago

All Posts, extended view

Note: See TracTickets for help on using tickets.