I already know how to remove a metabox from my custom post type edit page. However I want to remove the comments metabox but still allow commenting for the post. Because I notice when I do remove it, it disables comments. Any function I can use?
5 s
Don’t remove this via CSS. The _POST part is also active and WP save the data!
Use the hooks to remove meta boxes; code by scratch.
function fb_remove_comments_meta_boxes() {
remove_meta_box( 'commentstatusdiv', 'post', 'normal' );
remove_meta_box( 'commentstatusdiv', 'page', 'normal' );
// remove trackbacks
remove_meta_box( 'trackbacksdiv', 'post', 'normal' );
remove_meta_box( 'trackbacksdiv', 'page', 'normal' );
}
add_action( 'admin_init', 'fb_remove_comments_meta_boxes' );
see more on a plugin to remove all UI-elements and function for comments: https://github.com/bueltge/Remove-Comments-Absolutely