sybrew/the-seo-framework

Custom post titles broken since 4.2.8

Opened this issue · 2 comments

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

sybrew commented

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.

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.