Enable Gutenberg with filter does not work
-
Hi there!
When I try to enable Gutenberg editor for a certain CPT that has “show_in_rest” parameter set to false using the filter “gutenberg_can_edit_post_type” like this:
// Enable or disable Gutenberg in CPT function twentyfifteen_can_edit_post_type( $can_edit, $post_type ){ if( "service" == $post_type ){ return true; } return $can_edit; } add_filter( 'gutenberg_can_edit_post_type', 'twentyfifteen_can_edit_post_type', 10, 2 );It shows a blank screen when I load the editor.
The CPT is defined in a third party plugin, so I don’t want to modify the “show_in_rest” parameter manually.
Should I use instead the “register_post_type” function to update my CPT inside the theme?
Anyone can help me? Thank you very much!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Enable Gutenberg with filter does not work’ is closed to new replies.