Created
November 20, 2018 11:38
-
-
Save mohsinr/5d28afce64cc186486a259deb1d59534 to your computer and use it in GitHub Desktop.
Disable Gutenberg Everywhere But Keep Enabled for Blog Posts ie (cpt Post)
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 | |
//Disable Gutenberg for all but keep Enabled for Blog Posts only | |
function wm_gutenberg_disable_cpt($can_edit, $post_type){ | |
if($post_type != 'post'){ | |
$can_edit = false; | |
} | |
return $can_edit; | |
} | |
add_filter('gutenberg_can_edit_post_type', 'wm_gutenberg_disable_cpt', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment