How to Control GutenbergSettings in Your Theme(Enable-Disable Features)

How to Control Gutenberg Settings in Your Theme (Enable/Disable Features)

Dec 22, 2025 |

13 minutes read

How to Control GutenbergSettings in Your Theme(Enable-Disable Features)

Gutenberg Settings Management

The Gutenberg editor has become the foundation of modern WordPress content creation. With its block-based approach, users can design layouts visually without relying on shortcodes or page builders. However, while Gutenberg is powerful, not every feature fits every project. For many themes, especially custom, client-focused, or performance-optimized themes, having full control over Gutenberg settings is essential. 

By enabling or disabling specific Gutenberg features at the theme level, developers can create a cleaner editing experience, enforce design consistency, improve usability, and prevent content creators from accidentally breaking layouts. This guide explains how to control Gutenberg settings directly from your theme, helping you customize the editor to match your design system and project requirements. 

Why Control Gutenberg Settings in a Theme? 

Out of the box, Gutenberg offers a wide range of tools: font sizes, colors, spacing controls, layout options, block patterns, and experimental features. While flexibility is useful, too many options can overwhelm editors or conflict with your theme’s visual identity. 

Controlling Gutenberg settings allows you to: 

  • Maintain consistent branding and typograph
  • Simplify the editor for non-technical user
  • Prevent layout-breaking customization
  • Improve editorial workflo
  • Align editor output with frontend desig

For client projects, restricting unnecessary options often results in fewer support issues and cleaner content. 

Understanding Where Gutenberg Settings Are Controlled 

Gutenberg settings can be managed in three main ways: 

  1. Theme support functions (functions.php
  2. theme.json configuratio
  3. Editor filters and hooks 

Modern WordPress themes usually combine all three methods for complete control.

Disabling Gutenberg Completely (Optional)

In some cases—such as legacy themes—you may want to disable Gutenberg entirely and revert to the Classic Editor. 

add_filter(‘use_block_editor_for_post’, ‘__return_false’); 

However, this approach is not recommended for modern themes unless necessary. A better strategy is to customize Gutenberg, not remove it. 

Controlling Core Gutenberg Features Using add_theme_support() 

WordPress allows themes to enable or disable certain editor features using add_theme_support(). 

Disable Custom Colors 

Prevent users from selecting arbitrary colors and enforce brand colors only. 

add_theme_support(‘disable-custom-colors’); 

Disable Custom Font Sizes 

If your design system uses fixed typography values: 

add_theme_support(‘disable-custom-font-sizes’); 

Disable Drop Cap 

Drop caps can disrupt layouts if not styled properly. 

add_theme_support(‘disable-drop-cap’); 

Disable Custom Gradients 

To keep backgrounds clean and consistent: 

add_theme_support(‘disable-custom-gradients’); 

Defining Allowed Colors and Font Sizes 

Instead of removing options entirely, you can limit them.

Define a Custom Color Palette


add_theme_support('editor-color-palette', [ 
	[ 
    	'name'  => 'Primary', 
    	'slug'  => 'primary', 
    	'color' => '#005af0', 
	], 
	[ 
    	'name'  => 'Dark', 
    	'slug'  => 'dark', 
    	'color' => '#111111', 
	], 
]); 

Define Custom Font Sizes


add_theme_support('editor-font-sizes', [ 
	[ 
    	'name' => 'Small', 
    	'size' => 14, 
    	'slug' => 'small', 
	], 
	[ 
    	'name' => 'Large', 
    	'size' => 32, 
    	'slug' => 'large', 
	], 
]); 

Using theme.json for Advanced Control

theme.json is now the preferred method for managing Gutenberg settings in block and hybrid themes. It provides centralized, declarative control over styles and editor behavior. 

Disable Features Using theme.json


{ 
  "settings": { 
	"color": { 
  	"custom": false, 
  	"customGradient": false 
	}, 
	"typography": { 
  	"customFontSize": false 
	}, 
	"spacing": { 
  	"customPadding": false 
	} 
  } 
} 

This approach is cleaner, future-proof, and easier to maintain than PHP-only solutions. 

Restricting Layout Controls

To prevent editors from changing layout width or spacing


{ 
  "settings": { 
	"layout": { 
  	"contentSize": "720px", 
  	"wideSize": "1200px" 
	} 
  } 
} 

This ensures that wide and full-width blocks remain within your design boundaries. 

Disabling Specific Gutenberg Blocks

If certain blocks don’t fit your theme, you can remove them entirely.


add_filter('allowed_block_types_all', function ($blocks) { 
	return [ 
    	'core/paragraph', 
    	'core/heading', 
    	'core/image', 
    	'core/list', 
    	'core/button' 
	]; 
}); 

This is especially useful for minimalist themes or structured content workflows.

Removing Block Patterns and Layouts

WordPress includes many default block patterns that may not match your design. 

remove_theme_support(‘core-block-patterns’); 

Disabling Block Directory Access

To prevent users from installing blocks from the WordPress block directory


remove_action('enqueue_block_editor_assets','wp_enqueue_editor_block_directory_assets'); 

This helps maintain site stability and security. 

Customizing Editor UI for Better UX

You can also enhance usability by: 

  1. Hiding advanced block control
  2. Locking block template
  3. Preventing block movemen
  4. Disabling HTML editing 

Example: Locking blocks in a template ensures layout integrity while allowing content changes.

Best Practices for Controlling Gutenberg Settings

  1. Always match editor styles with frontend styles 
  2. Limit options instead of removing everything 
  3. Use theme.json whenever possible 
  4. Test editor experience with real users 
  5. Avoid over-restricting creative content areas 
  6. Keep settings documented for future maintenance 

A well-configured editor saves time, reduces errors, and improves content quality.

When Should You Restrict Gutenberg Features? 

Restrict Gutenberg features when: 

  1. Building client or enterprise websites 
  2. Enforcing strict brand guidelines 
  3. Creating reusable layouts 
  4. Reducing editorial mistakes 
  5. Optimizing performance 

Leave more freedom when: 

  1. Running blogs or content-heavy platform
  2. Supporting creative editor
  3. Encouraging experimentation 

Customize Gutenberg for better control and workflow

The Way Forward

Controlling Gutenberg settings within your theme is one of the most effective ways to improve content consistency, editorial confidence, and long-term maintainability. By enabling only the features your design truly needs and disabling everything else, you create a focused editing experience that aligns perfectly with your frontend output. 

Whether you use add_theme_support(), theme.json, or editor filters, Gutenberg gives you full control when used thoughtfully. With the right configuration, the editor becomes not just a content tool but a guided design system that protects your layout, branding, and performance. 

Mastering Gutenberg control is a key skill for modern WordPress theme development, and it pays off in cleaner code, happier clients, and more reliable websites. 

 You may also like this: Gutenberg theme.json Guide for Modern WordPress Styling 

Free Consultation

    Chandra Rao



    MAP_New

    Global Footprints

    Served clients across the globe from38+ countries

    iFlair Web Technologies
    Privacy Overview

    This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.