In my custom post type declaration, I have the following metabox (as an example)
$meta_boxes[] = array(
'id' => 'description',
'title' => 'Description',
'pages' => array('recipe'),
'context' => 'normal',
'priority' => 'high',
'include' => array(
'custom' => 'my_include_field'
),
'fields' => array(
array(
'id' => $prefix.'description',
'type' => 'wysiwyg',
)
)
);
I wrote a function which tests against a setting, but just to try to make it do SOMETHING, I did this
function my_include_field($meta_box) {
return false;
}
But the box is still showing up in the CPT single post edit.