How to Disable Gutenberg for Specific Post Types
While the Gutenberg (Block) editor is the default editing experience in modern WordPress, it isn’t always the best fit. Many sites still rely on the Classic Editor for certain content types — especially when using custom meta boxes, legacy shortcodes, or highly structured custom post types.
This article explains how to disable Gutenberg safely for specific post types only, without affecting the rest of your WordPress site.
When Should You Disable Gutenberg?
Disabling Gutenberg selectively makes sense in cases like:
- Custom post types with many custom meta boxes
- Legacy themes built around the Classic Editor
- Content managed via ACF fields instead of blocks
- Posts using heavy shortcodes or page-builder layouts
- Admin users who prefer a simplified editing UI
Important: Avoid disabling Gutenberg site-wide unless absolutely necessary.
Method 1: Disable Gutenberg Using the use_block_editor_for_post_type Filter (Recommended)
This is the cleanest and most future-proof method.
add_filter( 'use_block_editor_for_post_type', function( $use_block_editor, $post_type ) {
$disabled_post_types = array(
'event',
'news',
'custom_post',
);
if ( in_array( $post_type, $disabled_post_types, true ) ) {
return false;
}
return $use_block_editor;
}, 10, 2 );
This disables Gutenberg only for the specified post types and keeps it enabled elsewhere.
Method 2: Disable Gutenberg for the Default post Type Only
If you want to keep Gutenberg for pages and CPTs but disable it for blog posts:
add_filter( 'use_block_editor_for_post_type', function( $use_block_editor, $post_type ) {
if ( $post_type === 'post' ) {
return false;
}
return $use_block_editor;
}, 10, 2 );
Method 3: Disable Gutenberg for Pages Only
Useful for sites that rely on classic page templates.
add_filter( 'use_block_editor_for_post_type', function( $use_block_editor, $post_type ) {
if ( $post_type === 'page' ) {
return false;
}
return $use_block_editor;
}, 10, 2 );
Method 4: Disable Gutenberg for a Specific Post ID
This is rarely needed, but can be useful for special pages.
add_filter( 'use_block_editor_for_post', function( $use_block_editor, $post ) {
if ( $post && (int) $post->ID === 42 ) {
return false;
}
return $use_block_editor;
}, 10, 2 );
Method 5: Disable Gutenberg for CPTs Registered Without Block Support
You can disable Gutenberg directly when registering a custom post type.
register_post_type( 'event', array(
'label' => 'Events',
'public' => true,
'show_in_rest' => false, // disables Gutenberg
'supports' => array( 'title', 'editor' ),
) );
Note: Setting show_in_rest to false also disables REST API features for that post type. Use this only if you don’t need block support or REST access.
Recommended: Combine with the Classic Editor Plugin
If you plan to mix editors across post types, install the official Classic Editor plugin.
- Keeps Classic Editor supported by WordPress
- Prevents editor-related compatibility issues
- Works seamlessly with the filters shown above
After installing it, choose:
Settings → Writing → Default editor
and enable “Allow users to switch editors” if needed.
Where to Add the Code
- Best: Code Snippets plugin (safe enable/disable)
- Also OK: Child theme
functions.php - Best for teams: Small custom plugin
Common Mistakes to Avoid
- Disabling Gutenberg globally without a clear reason
- Using outdated
remove_post_type_support()hacks - Setting
show_in_resttofalseunintentionally - Forgetting that blocks won’t render in Classic Editor content
Quick Decision Guide
- Selective control:
use_block_editor_for_post_type - One-off page:
use_block_editor_for_post - CPT-level design choice:
show_in_rest
Conclusion
Gutenberg doesn’t have to be all-or-nothing. By disabling it selectively for specific post types, you can keep modern block editing where it makes sense — and retain the Classic Editor where stability and structured editing matter more.
Key takeaway:
Use WordPress filters, not hacks, to control the editor experience per post type.
This approach keeps your site flexible, maintainable, and future-proof.
🎨 Want to learn more? Visit our WordPress Customization Hub for tips and advanced techniques.