With the release of the Gutenberg editor, many people will find that their custom post types (CPTs) are not using the new editor features. The good news is to add Gutenberg to your custom post types is pretty straightforward.

How to check for Custom Post Type & Gutenberg Compatibility

There are two things to check:

  • is it available to the rest API? Look for the key ‘show_in_rest’ and set the key value to true.
  • does your CPT support editor? Look for the key ‘supports’ and add ‘editor’ to the array that probably already exists.

These values will be set when registering your custom post type in an array that passes arguments (args) and will look something like the following code example.

$args = array(
    'show_in_rest'       => true,
    'supports'           => array( 'title', 'editor', 'thumbnail' ),

That is it, you should now have the Gutenberg editor available to your custom post type (CPT). Enjoy.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.