Skip to content

Instantly share code, notes, and snippets.

@dr5hn
Created September 3, 2021 11:29
Show Gist options
  • Save dr5hn/bf319a24ee930e9c46eb2e02c6367035 to your computer and use it in GitHub Desktop.
Save dr5hn/bf319a24ee930e9c46eb2e02c6367035 to your computer and use it in GitHub Desktop.
Disable Gutenberg in Wordpress
add_filter('use_block_editor_for_post_type', function($use_block_editor, $post_type){
return in_array($post_type, []);
}, 10, 2);
add_action( 'wp_enqueue_scripts', function(){
wp_dequeue_style( 'wp-block-library' );
}, 100 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment