<?php
function dottaware_remove_post_metaboxes() {
$args = array(
'public' => true,
);
foreach ( get_post_types( $args, 'names' ) as $post_type ) {
remove_meta_box( 'postcustom', $post_type, 'normal' ); // Custom fields.
remove_meta_box( 'trackbacksdiv', $post_type, 'normal' ); // Trackbacks.
remove_meta_box( 'commentstatusdiv', $post_type, 'normal' ); // Comments status.
remove_meta_box( 'commentsdiv', $post_type, 'normal' ); // Comments.
remove_meta_box( 'genesis_inpost_seo_box', $post_type, 'normal' ); // Genesis SEO.
remove_meta_box( 'genesis_inpost_layout_box', $post_type, 'normal' ); // Genesis Layout.
remove_meta_box( 'genesis_inpost_scripts_box', $post_type, 'normal' ); // Genesis Scripts.
}
}
add_filter( 'add_meta_boxes', 'dottaware_remove_post_metaboxes', 99 );
// alternative method.
// add_action( 'admin_menu', 'dottaware_remove_post_metaboxes', 99 );