Hi,
The code helps you to disable one custom block on the specific post type, understand that is enabled by default if you do not add the condition. See my screen record https://share.getcloudapp.com/L1udYD40.
Full of code to test
add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name', 999 );
function your_prefix_function_name( $meta_boxes ) {
$prefix = '';
if( isset( $_GET['post_type'] ) && $_GET['post_type'] == 'page' ) {
return $meta_boxes;
}
$meta_boxes[] = [
'title' => __( 'My Block', 'your-text-domain' ),
'category' => 'text',
'type' => 'block',
'context' => 'content',
'fields' => [
[
'name' => __( 'Text', 'your-text-domain' ),
'id' => $prefix . 'text_t4541bur58',
'type' => 'text',
],
],
];
return $meta_boxes;
}