如何禁用WordPress的小部件块编辑器(Widgets Block Editor)?
分类:WordPress
WP 5.8 带有一个新系统来管理名为“Widgets Block Editor”的事件。如何禁用这个新系统并恢复 WordPress 的经典小部件编辑器?
2个回复
-
方法一:是否要禁用古腾堡新的小部件块编辑器页面并带回旧的小部件页面?您只需将此行添加到主题的 functions.php 文件中即可:
// Disables the block editor from managing widgets in the Gutenberg plugin. add_filter( 'gutenberg_use_widgets_block_editor', '__return_false', 100 ); // Disables the block editor from managing widgets. renamed from wp_use_widgets_block_editor add_filter( 'use_widgets_block_editor', '__return_false' );
不要忘记保存functions.php 文件。
3年前 我来评论