When updating an existing Custom Post Type, where you want the Classic editor selected. The Title and Editor checkboxes auto-select. Even when you de-select those checkboxes and save the post type; the title and editor checkboxes save as selected.
As a result, the custom post type has the Title and Editor fields when it shoudn't.
The only way to de-select the Title and Editor for a Custom Post Type is by manually changing it in the database, or triggering an export - modifying the JSON to remove the <supports> node for the post type and re-importing.
Steps to reproduce
Create a new Custom Post Type
- Set Editor to "Classic"
- De-select the Title and Editor checkboxes
On save, if you go to create a new Custom Post, the Title and Editor fields are missing (which is the expected behaviour)
Now go back into the newly created Custom Post Type and you will see the Title and Editor fields are now checked. (which they shouldn't be)
Uncheck those fields and click "Save Post Type"
Despite unchecking the fields, if you now go to create a new Custom Post, you will see the Title and Editor fields (which you shouldn't)
Hi Daniel,
Actually this is intentional. While you're able to disable post content area, you're not able to disable the post title field as this is required for the post to be created.
Thanks,
Shane
Hi Shane,
In my scenario, you aren't able to disable the post content area / editor section. (Well, you are initially when creating the post type, however, when you go back to modify the post type it keeps enabling it)
Also, you are able to initially create a post type without the title field. Any posts created have the title automatically set to "Auto Draft" which is a good solution. Again, when you go back to modify the post type to change something else, it keeps automatically turning on.
Definitely a bug
Thanks
Daniel
Hi Daniel,
For clarity, you're saying that you are able to disable the Title and Content checkbox ? However now you're not able to ?
Or is it that you're saying that if you create the post without the Post Title it gets an Auto Draft title Which is expected. Perhaps i'm not understanding your workflow entirely.
As I know in my testing that I can replicate your issue, however I am able to disable the post content only.
Perhaps a short recording of your workflow will help me to understand better.
Thanks,
Shane
Hi Shane,
I've captured a quick video to explain the issue, which you can see on the link below
enlace oculto
Any questions, let me know
Thanks
Daniel
Hi Daniel,
Thank you for the video.
I'm able to understand the issue better now. I've escalated this ticket to our 2nd tier support for further checks. I've also provided them with the link for the video as well.
I will keep you updated on any progress.
Thanks,
Shane
Hi Daniel,
I've been referred to this documentation by our 2nd tier support team.
https://developer.wordpress.org/reference/functions/register_post_type/#supports
Essentially the editor must have at least one of the items checked.
If you select the author checkbox then you will be able to disable the post title and content.
Thanks,
Shane
Got it, thanks for your help Shane