Disable Comments

The Disable Comments module removes comment functionality across your WordPress site, helping reduce spam, moderation workload, and database clutter. It disables comment sections, admin menus, and widgets—while keeping WooCommerce product reviews intact if you need them.

How to use

To enable the Disable Comments Module:

  1. Click on the “Disable & Organise” category
  2. Search or scroll to locate the Disable Comments Module
  3. Click on the switch to enable

What’s next?

This module will disable all comment functionality across your WordPress site, except for WooCommerce products (if installed). Here’s what happens when enabled:

1. What’s Disabled

  • Comments Section: Removed from all posts and pages
  • Admin Menu: “Comments” menu is hidden from the admin sidebar
  • Dashboard Widgets: Recent comments widget is removed
  • Admin Bar: Comment-related links are removed
  • Comment Support: Removed from all post types (except products)

2. What’s Not Affected

  • WooCommerce product reviews (if WooCommerce is active)
  • Any custom comment functionality in themes or plugins that don’t use standard WordPress comments

3. Customization

The module provides several filters for customization:

Modify which post types should keep comment support:

add_filter('wpextended/disable-comments/post_types', function($post_types) {
// Add or remove post types as needed
// Example: $post_types[] = 'custom_post_type';
return $post_types;
});


Completely disable the module's functionality:

add_filter('wpextended/disable-comments/disable_all', '__return_false');

4. Re-enabling Comments

To restore comment functionality:

  1. Go back to the Disable Comments Module
  2. Click the switch to disable the module
  3. If needed, re-enable comments for specific post types in Settings > Discussion

Important Notes:

  • This module affects all users, including administrators
  • Existing comments will remain in the database but won’t be accessible through the admin interface
  • Some themes may require additional CSS to hide comment-related elements
  • If you’re using a caching plugin, you may need to clear your cache after enabling/disabling this module

This module is ideal for:

  • Business websites that don’t require user interaction
  • Sites that use alternative commenting systems
  • Reducing database size and improving performance
  • Minimizing security risks associated with comment spam

Need help?

Still need help? Create a support ticket and our team will get back to you shortly.