When your website means business.

CPT, PHP, WP/CP | Type: PHPDisable Gutenberg for selected Custom Post Types

function my_disable_gutenberg( $current_status, $post_type ) {
    // Disabled post types
    $disabled_post_types = array( 'book', 'movie' );
    // Change $can_edit to false for any post types in the disabled post types array
    if ( in_array( $post_type, $disabled_post_types, true ) ) {
        $current_status = false;
    return $current_status;
add_filter( 'use_block_editor_for_post_type', 'my_disable_gutenberg', 10, 2 );

Reference Links

We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Cookies Notice