wp-admin » Disable WordPress Comments

Disable WordPress Comments

There are several ways to disable comments in WordPress:

From the WordPress administration panel

  • Go to the “Settings > Discussionpage.
  • Uncheck the “Allow people to post comments on new posts” option.
  • Click the “Save Changes” button.
chrome 86t6PcE2Fb - Disable WordPress Comments
Allow people to post comments on new posts

This will disable comments on all new posts and pages. If you want to disable comments on existing posts and pages, you can do so by editing each post or page and unchecking the “Allow comments” option.

image 83 - Disable WordPress Comments
wp disable comments

There are several plugins available that allow you to disable comments in WordPress. One popular plugin is “Disable Comments”.

To use this plugin:

  • Install and activate the plugin.
  • Go to the “Settings > Disable Comments” page.
  • Check the options to disable comments on posts, pages, attachments, and other post types.
  • Click the “Save Changes” button.

You can also disable comments in WordPress by adding the following code to your theme’s functions.php file:

// Disable support for comments and trackbacks in post types
function df_disable_comments_post_types_support() {
  $post_types = get_post_types();
  foreach ($post_types as $post_type) {
    if(post_type_supports($post_type, 'comments')) {
      remove_post_type_support($post_type, 'comments');
      remove_post_type_support($post_type, 'trackbacks');
add_action('admin_init', 'df_disable_comments_post_types_support');

// Close comments on the front-end
function df_disable_comments_status() {
  return false;
add_filter('comments_open', 'df_disable_comments_status', 20, 2);
add_filter('pings_open', 'df_disable_comments_status', 20, 2);

// Hide existing comments
function df_disable_comments_hide_existing_comments($comments) {
  $comments = array();
  return $comments;
add_filter('comments_array', 'df_disable_comments_hide_existing_comments', 10, 2);

// Remove comments page in menu
function df_disable_comments_admin_menu() {

Was this post helpful?

Leave a Comment

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.