Last active
November 9, 2021 09:45
-
-
Save stevenroh/d3cd9374df11b55c3023b715847febd0 to your computer and use it in GitHub Desktop.
Disable gutenberg/new editor for CPT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('use_block_editor_for_post_type', 'prefix_disable_gutenberg', 10, 2); | |
function prefix_disable_gutenberg($current_status, $post_type) { | |
if ($post_type === 'cpt1') return false; | |
if ($post_type === 'cpt2') return false; | |
if ($post_type === 'cpt3') return false; | |
return $current_status; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment