How to enable Gutenberg editor on custom post type?

banner-image

We can create a custom post type and custom taxonomy on WordPress sites using some specific functions. You can get more info on this on this detailed tutorial page.

But by default, WordPress Gutenberg editor is disabled on that post type.

To enable the editor on custom post type, we just need to add this one-line argument on the register_post_type array.

'show_in_rest' => true,

That’s it. By doing that Gutenberg editor will be activated on your custom post type.

 

 

 

You will find more info on this link.

Tags:

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x