How to Disable Block Editor Features You Don’t Need
The WordPress Block Editor (Gutenberg) is powerful, but it ships with many features that are unnecessary
—or even harmful—in professional, code-driven projects.
Unused block features increase UI complexity, confuse editors, and can introduce inconsistent markup.
This article explains how to selectively disable Block Editor features you don’t need,
using code-based, future-safe approaches.
Why You Should Disable Block Editor Features
- Reduce editor UI clutter
- Prevent accidental layout breakage
- Enforce design consistency
- Simplify editor onboarding
- Lower long-term maintenance cost
The goal is not to “turn Gutenberg off”, but to curate it.
Understand the Control Layers
Block Editor features can be controlled at multiple levels:
- Theme support flags (
add_theme_support) - Block registration filters
- Editor settings filters
- Allowed block lists (per post type)
Choosing the right layer avoids fragile hacks.
Disable Global Block Styles (Very Common)
WordPress injects global styles and CSS variables via global-styles-inline-css.
If you manage styles entirely via your theme, this is often unnecessary.
<?php
add_action( 'wp_enqueue_scripts', function () {
wp_dequeue_style( 'global-styles' );
wp_dequeue_style( 'wp-block-library' );
}, 20 );
This removes frontend block CSS. Use only if your theme fully controls styling.
Disable Block Editor Color, Font, and Layout Controls
Many editor controls are enabled via theme support flags.
Disabling them reduces visual inconsistency.
<?php
add_action( 'after_setup_theme', function () {
// Disable custom colors and gradients
add_theme_support( 'disable-custom-colors' );
add_theme_support( 'disable-custom-gradients' );
// Disable custom font sizes
add_theme_support( 'disable-custom-font-sizes' );
// Disable line-height and spacing controls
add_theme_support( 'custom-line-height', false );
add_theme_support( 'custom-spacing', false );
// Disable layout controls (wide/full)
remove_theme_support( 'align-wide' );
} );
This is one of the safest and most future-proof ways to simplify the editor.
Disable Block Patterns
Block patterns can confuse editors in structured content workflows.
<?php
remove_theme_support( 'core-block-patterns' );
This removes default WordPress patterns from the inserter.
Disable Specific Core Blocks
If editors should not use certain blocks (e.g. Buttons, Columns, Cover),
explicitly disallow them.
Allow-List Approach (Recommended)
Instead of disabling blocks one by one, define exactly what is allowed.
<?php
add_filter( 'allowed_block_types_all', function ( $allowed_blocks, $editor_context ) {
if ( empty( $editor_context->post ) ) {
return $allowed_blocks;
}
if ( $editor_context->post->post_type !== 'post' ) {
return $allowed_blocks;
}
return array(
'core/paragraph',
'core/heading',
'core/list',
'core/image',
'core/quote',
);
}, 10, 2 );
This guarantees markup consistency and avoids accidental layout blocks.
Disable Blocks Per Post Type
Different post types often need different block sets.
<?php
add_filter( 'allowed_block_types_all', function ( $allowed_blocks, $editor_context ) {
if ( empty( $editor_context->post ) ) {
return $allowed_blocks;
}
switch ( $editor_context->post->post_type ) {
case 'page':
return array(
'core/paragraph',
'core/heading',
'core/image',
);
case 'post':
return array(
'core/paragraph',
'core/heading',
'core/list',
'core/quote',
);
}
return $allowed_blocks;
}, 10, 2 );
Disable the Block Directory (Remote Block Installer)
The block directory allows installing blocks from WordPress.org directly in the editor.
In managed environments, this is often undesirable.
<?php
add_filter( 'block_editor_settings_all', function ( $settings ) {
$settings['enableBlockDirectory'] = false;
return $settings;
} );
Disable Reusable Blocks (Optional)
Reusable blocks are powerful but can introduce hidden dependencies.
If you don’t want editors to use them:
<?php
add_filter( 'block_editor_settings_all', function ( $settings ) {
$settings['enableReusableBlocks'] = false;
return $settings;
} );
Hide Editor UI Panels (Last Resort)
Some panels can only be hidden via JavaScript or CSS.
Use this sparingly, as UI selectors can change.
<?php
add_action( 'admin_enqueue_scripts', function () {
wp_add_inline_style(
'wp-edit-blocks',
'.edit-post-sidebar__panel-tabs { display: none; }'
);
} );
Prefer theme support flags whenever possible.
Recommended Minimal Block Setup (Editorial Sites)
- Disable custom colors, fonts, spacing
- Disable wide/full alignments
- Allow-list core text blocks only
- Remove block patterns
- Disable block directory
This results in a clean, predictable editing experience.
Common Mistakes
- Disabling blocks globally without scoping by post type
- Using CSS hacks instead of proper editor settings
- Leaving powerful layout blocks enabled unintentionally
- Assuming editors will “use it correctly”
Summary
- The Block Editor is modular—use that to your advantage
- Disable features via theme support and editor filters first
- Use allow-lists to enforce consistency
- Tailor block availability per post type
- Less editor freedom often means fewer production bugs
Curating the Block Editor is not about restriction—it’s about creating a focused,
safe editing environment that matches your project’s architecture.
🎨 Want to learn more? Visit our WordPress Customization Hub for tips and advanced techniques.