Lingo
Lingo

Reputation: 600

Create a hidden custom post type in wordpress

I want to store books in a custom post type. But the post type should not be modifiable in the admin menu.

Do I have to register the custom post type or can i just use wp_insert_post without register the custom post type books.

What i want to achieve: Store my book data typified in the wordpres database.

Thanks for your answers.

Upvotes: 2

Views: 1212

Answers (1)

Ash0ur
Ash0ur

Reputation: 1545

make public false, It will be hidden on admin dashboard.

   register_post_type( 'custom_post_type_name', array( 

    'public' => false,

   ) );

Upvotes: 3

Related Questions