Create metaboxes based on custom post type

When defining your MetaBox before registering it, just set the PostTypes it is applicable for: $f711_meta_boxes[] = array( ‘id’ => ‘details’, ‘title’ => __( ‘Details’, ‘f711_theme’ ), ‘pages’ => array( ‘publicity’ ), // change this values ‘context’ => ‘normal’, ‘priority’ => ‘high’, ‘fields’ => array( array( ‘name’ => __( ‘Fischi ist’, ‘f711_theme’ ), ‘desc’ => … Read more

How to remove some metaboxes for CPTs?

@Jeffrey’s answer is correct is you are the one registering the post types, simply remove the support argument for comments. But if you want to remove it from all custom post types (that may be registered by plugins too) you can do: $cptslugs = get_post_types( array(‘public’=>false, ‘_builtin’ => false) , ‘names’, ‘and’); foreach ($cptslugs as … Read more