Disable Gutenberg For Custom Post Type

If you want to disable Gutenberg for your Custom Post Type (in this example, it is CPT my_cpt), you can use this snippet:

add_filter('use_block_editor_for_post_type', 'cdy_disable_gutenberg', 10, 2);
function cdy_disable_gutenberg($current_status, $post_type)
    if ($post_type === 'my_cpt') {
        return false;

    return $current_status;

Leave a Comment

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

Scroll to Top