Skip to content

Instantly share code, notes, and snippets.

@lstanard
Last active March 16, 2016 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lstanard/330e7c39c3e6f3971523 to your computer and use it in GitHub Desktop.
Save lstanard/330e7c39c3e6f3971523 to your computer and use it in GitHub Desktop.
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