Disable block editor for specific post types in WordPress

The Gutenberg block editor changed how WordPress content is created, introducing a visual drag-and-drop interface built from reusable blocks. For most use cases it is an improvement — flexible, intuitive, and powerful enough to build complex layouts without extra plugins. However, not every post type benefits from the block editor experience. Custom post types used for testimonials, team members, event listings, or portfolio items often store only a few structured fields managed by ACF or other meta box plugins. Opening a testimonial entry in Gutenberg with its full block toolbar and sidebar feels overcomplicated when all you really need are two or three text fields and a save button. In some cases the visual noise genuinely slows down content editors who fill in dozens of entries per day. The classic TinyMCE editor is a simpler and faster interface for those content types. Fortunately, WordPress provides a dedicated filter hook that lets you control exactly which post types use Gutenberg and which fall back to the classic editor. The filter is called use_block_editor_for_post_type and it runs every time a post edit screen loads. It receives two arguments: a boolean flag (true means block editor is active) and the current post type slug. Returning false for a specific post type disables Gutenberg for that type only, leaving all others untouched. You do not need the Classic Editor plugin to achieve this — the filter is built into WordPress core since version 5.0. A simple conditional in functions.php is all you need.

Problem: You need the classic editor for some post types while keeping Gutenberg for others.

Solution: Add the following code to your functions.php file:

<?php
add_filter( 'use_block_editor_for_post_type', 'ha_disable_gutenberg_for_post_types', 10, 2 );

function ha_disable_gutenberg_for_post_types( $use_block_editor, $post_type ) {
    $disabled_post_types = array( 'testimonial', 'team_member', 'portfolio' );

    if ( in_array( $post_type, $disabled_post_types, true ) ) {
        return false;
    }

    return $use_block_editor;
}

NOTE: Add each custom post type slug you want to exclude to the $disabled_post_types array. The third argument true in in_array() enables strict type comparison — always include it when comparing strings. This approach is cleaner than installing the Classic Editor plugin if you only need to disable Gutenberg for a subset of post types.