the-seo-framework icon indicating copy to clipboard operation
the-seo-framework copied to clipboard

Custom post titles broken since 4.2.8

Open mjulian87 opened this issue 1 year ago • 2 comments

After updating from 4.2.7 to 4.2.8 the title on custom posts is Untitled | Blog Name.

mjulian87 avatar Mar 20 '23 15:03 mjulian87

Hello! Sorry, I missed your issue.

Since TSF v4.2.8, if a post type doesn't support the 'title' feature, it won't get title generation support anymore. This aligns with WordPress's intent and prevents it from reading unmanageable/unreachable data.

You can still add a custom title. But it'd be best to add title support to the post type.

sybrew avatar Apr 01 '23 07:04 sybrew

Hi @sybrew,

Thanks for the information.

My understanding is that the 'supports' array was to determine which features to support on the edit screen, not to determine whether a post type directly supports a feature. From the WordPress Developer Handbook:

All core features are directly associated with a functional area of the edit screen, such as the editor or a meta box.

The custom post type that is causing the issue, doesn't have 'title' in the supports array because the title is generated from other meta that the user enters, and the option to edit the title manually should not be available to the user.

However WordPress is aware that the post has a title, and if I run the_title(), the correct title is returned.

I'm not sure that this is how WordPress intended the supports feature to be used.

mjulian87 avatar Apr 01 '23 09:04 mjulian87