Skip to main content
Login Join
Snippet · PHP

Disable Gutenberg Editor for All Post Types

Shared by Sumit Javia · May 9, 2026 · @use_block_editor_for_post_type

27 views
Back to Snippets

This snippet completely disables the Gutenberg block editor in WordPress and enables the Classic Editor for all post types using the use_block_editor_for_post_type filter. Useful for developers or websites that prefer the traditional WordPress editing experience.

// Disable Gutenberg editor
add_filter("use_block_editor_for_post_type", "sj_disable_gutenberg_editor");
function sj_disable_gutenberg_editor()
{
	return false;
}