Skip to content

Instantly share code, notes, and snippets.

@guytzhak
Created March 26, 2022 13:26
Show Gist options
  • Save guytzhak/61ff76143ffcf2f920bd0c24a71c8c3b to your computer and use it in GitHub Desktop.
Save guytzhak/61ff76143ffcf2f920bd0c24a71c8c3b to your computer and use it in GitHub Desktop.
// disable Gutenberg for posts
add_filter('use_block_editor_for_post', '__return_false', 10);
// disable Gutenberg for post types
add_filter('use_block_editor_for_page', '__return_false', 10);
add_filter('should_load_block_editor_scripts_and_styles', '__return_false', 10);
remove_theme_support( 'editor-color-palette' );
remove_theme_support( 'wp-block-styles' );
remove_theme_support( 'core-block-patterns' );
remove_theme_support( 'editor-gradient-presets' );
remove_theme_support( 'editor-font-sizes' );
remove_action( 'enqueue_block_assets', 'enqueue_block_styles_assets', 30 );
remove_action( 'wp_body_open', 'wp_global_styles_render_svg_filters' );
remove_action( 'in_admin_header', 'wp_global_styles_render_svg_filters' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment