WordPress knowledge sharing

Four methods to restore WordPress classic widgets/disable WordPress block widgets

WordPress version 5.8 has updated the block widget function, and it has brought some trouble to many sites: they still want to use the classic widget function for various reasons. It should be Disable WordPress block widget Restore WordPress classic widget , Weiss notes provide four ways to solve this problem.

 Restore WordPress classic widget/disable WordPress block widget

1. Use code

Log in to WordPress background>Appearance>Theme Editor, or use FTP software to locate the/wp content/themes/current theme directory of the website.

Find and edit the functions.php file, and add the following two lines of code at the end:

add_filter( ‘gutenberg_use_widgets_block_editor’, ‘__return_false’ );
add_filter( ‘wp_use_widgets_block_editor’, ‘__return_false’ );

Then save the update file.

If you have many pieces of similar custom code, you can use Code Snippets plug-in Centralized management, which is convenient and practical, is not afraid of theme updates being overwritten and lost in the future.

2. Using the classic editor plug-in

The above code is not friendly to novices. Lao Wei introduces a classic widgets plug-in, which can also play the same role. Please see Classic Widgets Plug in Installation and Use Tutorial Detailed explanation of.

Plug ins can be installed and enabled without any settings. You can automatically disable the WordPress block widget and restore the WordPress classic widget.

In fact, when you open the plug-in file, there are also the two lines of code above.

3. WPJAM plug-in

This plug-in has a built-in one button option to block the Gutenberg editor, which is easy to use.

meanwhile The WPJAM Basic plug-in can also speed up WordPress optimization , the domestic website works well.

 The WPJAM plug-in has a built-in one button option to block the Gutenberg editor

4. Self contained theme

Weiss Notes Used DUX Theme It has a built-in one button function to disable Gutenberg, which is very convenient and saves a plug-in.

  DUX theme built-in one button disable Gutenberg function

If you upgrade to the latest version of WordPress and don't want to use block widgets, you can try the code or plug-ins. Old Wei suggested that novices use plug-ins directly.

Like( zero )
Article name: Four Ways to Restore WordPress Classic Widgets/Disable WordPress Block Widgets
Article link: https://www.vpsss.net/26245.html
Copyright notice: The resources of this website are only for personal learning and exchange, and are not allowed to be reproduced and used for commercial purposes, otherwise, legal issues will be borne by yourself.
The copyright of the pictures belongs to their respective creators, and the picture watermark is for the purpose of preventing unscrupulous people from stealing the fruits of labor.