Last update at :2024-07-07,Edit by888u
The Gutenberg editor of WordPress 5.0 is very uncomfortable. The following is the code to disable the editor of WordPress 5.0 and switch back to the traditional editor.
1. add_filter(‘use_block_editor_for_post’, ‘__return_false’); Add the above code to the current theme function template functions.php to switch back to the previous editor without a plug-in.
2. After the block editor is disabled in the background, the front-end will still load the relevant style files. You need to add a sentence: remove_action(‘wp_enqueue_scripts’, ‘wp_common_block_scripts_and_styles’); prohibit the front-end from loading style files.
That is, the following code:
add_filter(‘use_block_editor_for_post’, ‘__return_false’);
remove_action( ‘wp_enqueue_scripts’, ‘wp_common_block_scripts_and_styles’ );
Recommended site searches: host server rental, proxy server ipshopex virtual host, Wanwang registered domain name, mobile server rental, US virtual host, Japanese server rental Japanese server, IP address, host domain name, private server rental,
发表评论