Last active
April 24, 2018 14:56
-
-
Save BiancaNL/c2959b162daf20deff6fb62cdf5dd21b to your computer and use it in GitHub Desktop.
Hide Gutenberg only specific posts or pages
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
| 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