Skip to content

Instantly share code, notes, and snippets.

@BiancaNL
Last active April 24, 2018 14:56
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save BiancaNL/c2959b162daf20deff6fb62cdf5dd21b to your computer and use it in GitHub Desktop.
Hide Gutenberg only specific posts or pages
function disable_gutenberg_per_id( $classic ) {
global $post;
if ( 123 == $post->ID )
return false;
return $classic;
}
add_filter( 'gutenberg_can_edit_post_type', 'disable_gutenberg_per_id' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment