[wp-trac] [WordPress Trac] #45516: Auto Draft title issue for custom post types
WordPress Trac
noreply at wordpress.org
Tue Nov 11 18:56:54 UTC 2025
#45516: Auto Draft title issue for custom post types
-------------------------------------------------+-------------------------
Reporter: rajanit2000 | Owner:
| SergeyBiryukov
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future
| Release
Component: Posts, Post Types | Version: 5.0
Severity: minor | Resolution:
Keywords: has-screenshots has-test-info has- | Focuses:
patch has-unit-tests needs-copy-review | administration
-------------------------------------------------+-------------------------
Comment (by mindctrl):
It's unfortunate that post_title is a required field at the table level,
but then posts without titles are supported.
> It seems like the Post List Table class should check for title support
and use something else to differentiate the posts if no title is
supported.
On the admin side, this was the very first thought I had. Why show the
title field if the post type doesn't support titles? It's the default, and
it's where the actions row goes, but if you have no knowledge of WP
internals, it won't make a lot of sense. Also the Screen Options dropdown
doesn't allow you to turn off the title column display, even if you want
to, presumably because actions are attached to that column.
Any default fallback text for posts with no title is going to be confusing
in the admin, without some kind of additional code to update the list
table display. Is a list of 20 posts with "Auto Draft" really more
confusing than 20 posts with "(no title)" or similar? There's still no way
to differentiate them.
`get_the_title()` provides an empty string for the title of one does not
exist on the post object, but I don't imagine that's a common occurrence
given post_title is a NOT NULL field.
The Twenty Twenty One theme filters `the_title` to change an empty string
to "Untitled".
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45516#comment:72>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list