As I understand when we REGISTER (I am not talking about creating custom post types) custom post type WordPress not saved it in database. It is just a code. Why WordPress does not save it on separate table?

Why WordPress does not Use separate table for register the custom post types?

Table name : wp_post_types

Columns : ID, Post Type (Ex : Posts, Pages, etc and custom post types) and many columns for other fields like slug, etc.

So WordPress can store post_type_id in post_typecolumn of wp_posts table instead of post type name.

Read more here: Why WordPress does not Use Separate Table for Post Types (When Registring)?


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: