Disable the Block Editor for Specific Post Types
Keeps the block editor for posts but uses the classic editor for the post types you list (pages by default).
Opens WPIDE on
Code
add_filter( 'use_block_editor_for_post_type', function ( $use, $post_type ) {
// Post types that should use the classic editor.
$classic = array( 'page' );
return in_array( $post_type, $classic, true ) ? false : $use;
}, 100, 2 );
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.