What is the impact if i ignore title and content in my custom post types CPT?

I am using CPTs (with PODS) and i need to “ignore” in “supports” the title and content.

I have no problem to alter the columns in the admin manage CPT list.

Also i understand that the standard functionality of WP that manages the content and title will not be there and i will have to manage my meta info in the various templates.

Other than that do i have any problem if i ignore them and leave them blank?

2 Answers
2

If you supply no title, WordPress will set the title to: (example)

(no title)

This will be shown in the list table for the post type in the admin area, within the database, the post_title value will be empty.

enter image description here

As no title is supplied, WordPress will set the slug to: (example)

1234

…where 1234 is the ID of the object. The post_name value in the database will receive the ID.

enter image description here

Of course if you are programmatically supplying a slug then you can set the slug to something more meaningful than the ID and this is where the save_post hook comes in handy.

Important Note:

If you supply no content (value) for the post_content field, then your post will be set to auto-draft for the post_status column.

So you might need to use the save_post hook to set a default value for the post_content field.

Leave a Comment