Gutenberg great for posts but overkill for simple post types. Disable selectively per post type.
Disable for Specific Post Type:
add_filter('use_block_editor_for_post_type', function($use_block_editor, $post_type) {
// Disable for 'product' post type
if ($post_type === 'product') {
return false;
}
return $use_block_editor;
}, 10, 2);
Disable for Multiple Post Types:
add_filter('use_block_editor_for_post_type', function($use_block_editor, $post_type) {
$disabled_post_types = ['product', 'testimonial', 'team_member'];
if (in_array($post_type, $disabled_post_types)) {
return false;
}
return $use_block_editor;
}, 10, 2);
Disable Globally (All Post Types):
add_filter('use_block_editor_for_post', '__return_false');
Result: Classic editor for specific post types, Gutenberg for others!
