Skip to content

Post Title block: Allow post types to customize title placeholder text #75938

@xristos3490

Description

@xristos3490

Description

The Post Title block currently hardcodes "Title" as the preview text and "(no title)" as the placeholder for empty titles. There's no way for custom post types to customize these strings.

In the classic editor, the enter_title_here filter allowed plugins to change the placeholder per post type. There's no equivalent mechanism for the Post Title block in the site/post editor.

Proposal

Extend the post type supports registration so that title can accept an array with a placeholder option:

'supports' => array(
    'title' => array( 'placeholder' => 'Add product name' ),
),

The Post Title block should read this value from the REST API's post type data and use it for:

  • The static preview text (instead of "Title")
  • The editable input placeholder (instead of "(no title)")
  • The linked title fallback text

This aligns with how other supports (like editor) already accept extended configuration.

Edit: We have introduced a new placeholder attribute to replace the literal Title string.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions