Gutenberg PHP Intermediate

Disable Full Site Editing Theme Features

Last updated: May 6, 2026

Full Site Editing (FSE) is WordPress’s vision for managing every part of a website, headers, footers, templates, and global styles, through the block editor. It’s a significant architectural shift that works well with block themes designed for it. However, on sites using classic themes, page builders like Bricks Builder, or any setup where the theme manages layout independently of WordPress’s template hierarchy, FSE features are at best confusing and at worst a liability, clients can accidentally edit global templates and break the entire site layout.

This snippet provides a set of targeted removals to reduce FSE exposure without disabling the block editor entirely.

The Code

Add this to your functions.php or a site-specific plugin. Each block targets a different FSE surface area, apply only the ones relevant to your setup.

Removing the Site Editor

The first block removes the Appearance → Editor (Site Editor) menu item. This is the most important removal for sites that shouldn’t have full template editing. Note that removing the menu item doesn’t block direct URL access, a determined user could still navigate to /wp-admin/site-editor.php directly. For a harder block, combine this with a capability check using map_meta_cap or restrict access by role.

Removing block-templates Support

remove_theme_support( 'block-templates' ) prevents WordPress from using block-based templates for rendering the front end. This is relevant when a child theme inherits from a block theme parent but you want to use classic template files instead. Without this, WordPress may attempt to load block templates from the parent even when classic templates exist in the child.

Disabling Global Style Controls

The four add_theme_support calls at the bottom disable specific UI panels in the block editor sidebar: custom colors, custom font sizes, custom gradients, and custom spacing controls. These are the controls under the Styles tab that let editors override global design settings on individual blocks. Disabling them enforces design consistency by preventing block-level style overrides that conflict with your theme’s design system.

When FSE Is Appropriate

If your site is built on a block theme like Twenty Twenty-Three or any theme designed around theme.json and block templates, removing FSE features will break the intended editing workflow. This snippet is appropriate for classic themes, hybrid setups, and page-builder-first sites where the block editor is used only for post content, not for site-level template editing.

Per-Role Access Control

An alternative approach to removing FSE entirely is restricting it by role, allowing administrators access to the Site Editor while hiding it from editors and authors. This is achievable by combining the admin_menu removal with a current_user_can() check, showing the menu item only when the current user has a specific capability such as manage_options.

functions.php
// Remove the Site Editor menu item
add_action( 'admin_menu', function() {
    remove_submenu_page( 'themes.php', 'site-editor.php' );
} );

// Disable the template editor that appears inside the block editor
add_filter( 'gutenberg_can_edit_post_type', function( $can_edit, $post_type ) {
    // Keep block editing but disable template editing
    return $can_edit;
}, 10, 2 );

// Remove theme.json global styles from affecting the block editor
add_action( 'after_setup_theme', function() {
    // Prevent the child theme from inheriting FSE features from a block parent
    remove_theme_support( 'block-templates' );
} );

// Hide the Styles sidebar panel in the block editor
add_theme_support( 'disable-custom-colors' );
add_theme_support( 'disable-custom-font-sizes' );
add_theme_support( 'disable-custom-gradients' );
add_theme_support( 'disable-custom-spacing' );

Built by Nahnu Plugins

Need something more powerful than a snippet?

Our commercial plugins go further, built for serious WordPress sites with full support, updates, and documentation included.

Browse All Plugins →

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only