Block Editor PHP Beginner

Use the Classic Widgets Screen

Bring back the classic Appearance > Widgets screen and Customizer widgets instead of the block-based widget editor.

Tested on WordPress 7.1 PHP 8.3 No plugin needed Updated
functions.php 3 lines
add_action( 'after_setup_theme', function (): void {
	remove_theme_support( 'widgets-block-editor' );
} );

Where to add this

Recommended A code snippets plugin Survives theme changes and is easy to switch off.
Child theme At the end of your child theme's functions.php file.
Must-use plugin As a .php file in wp-content/mu-plugins, starting with <?php.

Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.

Since WordPress 5.8, the Widgets screen uses blocks. Some themes and widget plugins still work better with the classic screen, and some people simply prefer it. This snippet switches back.

How it works

Classic themes get block-based widgets through the widgets-block-editor theme feature. Removing it brings back the classic drag-and-drop Widgets screen and the classic widget panels in the Customizer.

Things to watch

  • Widgets you added as blocks keep working, inside a Block widget.
  • Block themes don’t use widgets at all, so this has no effect there.

How to test it

Go to Appearance → Widgets. You should see the classic two-column screen.

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