Skip to content

Early-bird lifetime licence: $199 once, for the first 200 buyers only. See the offer

Bring back classic widgets in WordPress without a plugin

Go back to the classic Widgets screen with two lines of code. The Snipfire snippet uses the same two filters as the official Classic Widgets plugin.

What Classic Widgets does

The official Classic Widgets plugin restores the classic widget screens and stops the block editor managing widgets. The plugin on WordPress.org

What the snippet does the same

  • Appearance > Widgets and the Customizer go back to the classic widget screens.
  • It uses the same two filters as the plugin, so the result is the same.
  • Like the plugin, there is nothing to set up. It works while it is switched on.

What's different

  • Nothing in how it works. The only difference is where the switch lives: in your snippets instead of your plugins list.
  • Both only matter with classic themes. Block themes don't have a Widgets screen.

When to keep the plugin Keep the plugin if you prefer an official plugin that the WordPress team maintains for you.

The snippet: Use the classic widgets screen

Appearance > Widgets and the Customizer go back to the classic widgets, as with the Classic Widgets plugin.

PHP
<?php

add_filter( 'use_widgets_block_editor', '__return_false' );
add_filter( 'gutenberg_use_widgets_block_editor', '__return_false' );

Notes, where it runs and what it was tested with

Switching from the plugin

  1. Install the snippet in Snipfire (it arrives switched off).
  2. Deactivate Classic Widgets.
  3. Switch the snippet on. Snipfire checks the code and test-loads your site first.
  4. Check the page it affects, then delete the plugin.

Move your snippets over this afternoon.

Importing changes nothing until you switch over, and your old shortcodes keep working.