How to Disable the Gutenberg WordPress Editor not use plugin

Add code to functions.php of theme using:

add_filter('use_block_editor_for_post', '__return_false', 10);
add_filter( 'use_widgets_block_editor', '__return_false' );

or

function lap_disable_gutenberg($current_status, $post_type)
{

	// Disabled post types

    $disabled_post_types = array( 'post' );

	// Change $can_edit to false for any post types in the disabled post types array
	if (in_array($post_type, $disabled_post_types, true)) {
		$current_status = false;
	}

	return $current_status;
}
add_filter('use_block_editor_for_post_type', 'lap_disable_gutenberg', 10, 2);

Leave a Reply

Your email address will not be published. Required fields are marked *