Block editor Doesn’t appear for custom post type
-
I wrote this code to disablem the block editor except on a single custom post type:
function ppt_custom_post_type_editor( $args, $post_type ) {
if ( $post_type === 'custom-post-type-slug' ) {
return true;
} else {
return false;
}
}
add_filter( 'use_block_editor_for_post_type', 'ppt_custom_post_type_editor', 10, 2 );The problem is that the block editor now doesn’t appaer even in the custom post type it is supposed to show…
I checked the custom post type slug and it’s correct.
Does anyone know what I’m doing wrong?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.