すべての投稿タイプ
functions.phpの好きなところに以下のように書くだけでOKです。
add_filter( 'use_block_editor_for_post', function( $use_block_editor) {
$use_block_editor = false;
}, 10, 2 );
特定の投稿タイプのみ
例)投稿タイプ名がhogeのみクラシックエディターにしたい場合
add_filter( 'use_block_editor_for_post', function( $use_block_editor, $post ) {
if ( $post->post_type === 'hoge') {
$use_block_editor = false;
}
return $use_block_editor;
}, 10, 2 );
コメント