WordPress ブロックエディタの停止方法cssも含めてね
WordPressのブロックエディタ便利ですよね? なので今日は停止させる方法を・・ 別にプラグインでも良いんですが。 function.php用です。
ブロックエディタで利用しているcssを停止する。
function remove_block_editor_css() {
wp_dequeue_style('wp-block-library');
}
add_action( 'wp_enqueue_scripts', 'remove_block_editor_css' ,9999);
ブロックエディターでの編集をやめる
add_filter( 'use_block_editor_for_post', '__return_false' );
ウィジェット編集画面をもクラシックへ
add_filter( 'use_widgets_block_editor', '__return_false' );
もっときめ細やかな制御を作るならばこちらを参照
https://developer.wordpress.org/reference/hooks/use_block_editor_for_post/ https://developer.wordpress.org/reference/functions/use_block_editor_for_post/ https://developer.wordpress.org/reference/functions/use_block_editor_for_post_type/