Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WP action and callback function to remove comments meta boxes from pages and posts
function remove_comment_meta_boxes() {
remove_meta_box('commentsdiv', 'page', 'normal');
remove_meta_box('commentsdiv', 'post', 'normal');
remove_meta_box('commentstatusdiv', 'post', 'normal');
}
add_action('do_meta_boxes', 'remove_comment_meta_boxes');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.