WordPress comment system removal

Turn comments off everywhere at once

Disable Comments removes the comment system from the entire site in one toggle: no form, no feed, no admin menu, no moderation queue, nothing left for spam to reach.

  • Removes comment support from every post type at once.
  • Closes comment feeds and drops the X-Pingback header.
  • Removes the Comments menu and the Discussion settings page.
  • Suppresses comment blocks in both classic and block themes.
Comment SystemDisable Comments
Comments admin menu
Dashboard "Recent Comments"
Comment form on posts
Comment feeds & pingbacks
Settings > Discussion
Comment system closedRemoved everywhere, not just per post.
Active
Quick answer

What does Disable Comments do?

When the disable_comments module is active, TOWP_Disable_Comments removes comments and trackbacks support from every registered post type, closes the comments_open and pings_open filters so nothing can be submitted, and returns an empty template in place of the comments list for classic themes while suppressing every core/comment* block for block themes. On the admin side, it removes the Comments menu and the Settings > Discussion page, redirecting any direct visit to Discussion back to the dashboard, removes the Recent Comments dashboard widget and admin bar link, and hides the comment counter and comment-moderation shortcuts from their respective screens.

The "switch it off, but it's still there" problem

WordPress only offers to disable comments one post at a time

A site that never wants comments still inherits every surface WordPress built to support them.

Turning comments off is a per-post setting

WordPress's own comment toggle lives on each individual post or page, which means disabling comments site-wide means editing every post, or trusting a default that new content can still override.

The surface area stays even when comments are closed

A closed comment form, an unused Comments menu, and a live comment feed all keep existing even on a site that's decided it never wants any of them.

A dedicated WordPress solution

Remove the system, not just the form

The module takes the comment system out of the site entirely, rather than switching it off content by content.

Every post type, at once

Comment and trackback support is removed from every post type in one pass, not configured per post or per type.

Every surface, not just the front end

The admin menu, the dashboard widget, the admin bar link and the Discussion settings page all disappear alongside the front-end form.

Nothing left for spam to reach

With comment support removed entirely, there's no open form, no feed, and no moderation queue to ever need attention.

Verified feature set

Full coverage, not a partial toggle

Every capability below is present in the supplied PHP class and its settings registration.

Submissions

Closed at the filter level

comments_open and pings_open both return false unconditionally, so nothing can be submitted regardless of a post's individual setting.

comments_openpings_open
Templates

An empty template, both theme types

Classic themes get a blank comments template; block themes have every core/comment* block suppressed at render time.

Blank templatecore/comment* suppressed
Feeds & headers

Comment feeds closed, pingback header dropped

Direct requests to the comment feed return a 403, and the X-Pingback header is removed from every response.

403 on feed accessX-Pingback removed
Admin surfaces

Comments menu and Discussion page removed

The Comments admin menu and the Settings > Discussion page both disappear, with direct access to Discussion redirected back to the dashboard.

Comments menuDiscussion redirected
Dashboard & profile

Widgets and shortcuts hidden too

The Recent Comments dashboard widget, the "At a Glance" comment counter and the comment-moderation keyboard shortcuts on the Profile page are all hidden.

Recent Comments widgetProfile shortcuts hidden
Practical use cases

Where removing comments helps most

The module supports every site that has genuinely decided it doesn't need a comment system.

Sites that never wanted comments

A portfolio, a landing page, or a business site with no plan to run a comment section gets the whole system out of the way in one toggle.

Reducing the attack and spam surface

Removing the comment system entirely closes off pingback abuse and comment spam as categories of problem, not just as something to moderate.

Cleaning up a site that outgrew comments

A site that used to run comments but no longer does can retire the whole system instead of leaving an empty form and an unused menu behind.

Operational benefits

A system removed, not just quieted

The module combines complete removal with a single, simple toggle.

One toggle covers the whole systemThere's no need to edit individual posts or hunt down every place comments could still appear.
A genuinely cleaner adminThe Comments menu, the dashboard widget and the Discussion settings page all stop competing for attention.
No moderation queue to maintainWithout an open comment form anywhere, there's nothing generating comments that need reviewing.
Works the same regardless of theme typeBoth classic and block themes get the same treatment, so switching themes later doesn't bring comments back unexpectedly.
Performance behaviour

One pass, fewer scripts to serve

The verified implementation removes work rather than adding much of its own.

One-time post type pass

Comment support removal runs once on init, iterating the registered post types rather than checking on every request.

Fewer scripts and feeds to serve

Dequeuing the comment-reply script and blocking the comment feed both mean less for the server to generate and send.

Simple, unconditional filters

comments_open and pings_open both return a fixed value, adding negligible overhead compared to WordPress's own default logic.

Security implementation

Closed at the source, not just hidden

The code blocks comment submission and feed access at the filter and request level, not only in the display layer.

01

Closed at the filter level, not just hidden

comments_open and pings_open return false unconditionally, so a request that bypasses the visible form still can't open a comment thread.

02

Direct comment feed requests are blocked

A request to the comment feed gets a 403 response rather than the feed content, closing off that access path entirely.

03

The Discussion settings page can't be reached directly

A direct visit to options-discussion.php redirects back to the dashboard instead of showing the page.

04

No admin configuration surface beyond the toggle

With nothing beyond a single switch, there's no additional input for this module to validate or secure.

Verified compatibility

Built around native WordPress comment and block APIs

The supplied code integrates through APIs present in WordPress core. No compatibility claim beyond the verified implementation is assumed.

Post type support

remove_post_type_support()

The same core function themes and plugins use to declare comment support, applied here to remove it instead.

remove_post_type_supportNative WordPress API
Block themes

render_block filter

Any block whose name starts with core/comment has its rendered output suppressed, covering the block-based comment list even where the classic template filter doesn't apply.

render_blockcore/comment*
Classic themes

comments_template filter

Returns a blank template file in place of whatever the active classic theme would otherwise load for comments.

comments_templateBlank template file
Solution comparison

TheOneWP versus common alternatives

Compare the verified Disable Comments implementation with WordPress's own default, per-post behaviour.

CapabilityTheOneWP Disable CommentsOther common solutions
Removing comments site-wide One toggle, applied to every post type at onceWordPress's own default only closes comments per post
Admin cleanup Comments menu and Discussion page both removedBoth remain visible even with comments closed
Comment feeds Blocked with a 403 responseOften still respond even when no comments exist
Theme compatibility Handles both classic and block themesMay only cover the classic comments_template filter
Administration One toggle, nothing else to configureUsually the same, when a dedicated option exists at all
Recommended workflow

Close the comment system in four steps

There's little to configure beyond confirming the change took effect everywhere.

01

Enable Disable Comments

Activate the module from the TheOneWP settings; there's nothing else to configure.

02

Check a public post

Confirm no comment form or list appears on a post that previously had comments.

03

Check the admin

Confirm the Comments menu and the Discussion settings page are both gone.

04

Leave it on

Since the module removes the system rather than a per-post setting, it needs no ongoing maintenance once enabled.

Best practices

Use it as a deliberate decision

The module is built for sites that have genuinely decided against comments, not as a temporary pause.

01

Decide before publishing much content

Enabling it early avoids ever building up a comment history that later needs deciding about.

02

Reconsider before a major theme change

Confirm a new theme's comment blocks or templates still get suppressed the same way after switching.

03

Remember it removes the system, not just old comments

This module changes what's possible going forward; it doesn't retroactively review comments already in the database.

04

Use it deliberately, not as a temporary fix

The module is meant for sites that genuinely don't want comments, not as a quick way to pause them for a short period.

Common mistakes

Avoid assumptions that overstate its scope

The module has a clear, deliberate scope that's worth understanding before enabling it.

Expecting old comments to be deleted

The module stops new comments from being possible and hides existing ones from display; it doesn't delete comment data already stored.

Confusing this with a per-post comment toggle

This module removes the entire comment system; it's not the same as WordPress's own per-post "Allow comments" setting, which it overrides everywhere.

Looking for a settings screen that isn't there

Like other single-purpose modules, this one is a toggle by design, with no further configuration screen.

Frequently asked questions

Disable Comments FAQ

These answers come directly from the verified class and its settings registration.

What does Disable Comments do?

It removes the comment system from the entire site: no comment form, no comment feed, no Comments admin menu, and no Discussion settings page.

Does this just close comments, or remove the system entirely?

It removes comment and trackback support from every post type, rather than only closing comments on individual posts.

Does this work with block themes as well as classic themes?

Yes. Classic themes get an empty comments template, and block themes have every core/comment* block suppressed at render time.

What happens if I visit Settings > Discussion directly?

The request redirects back to the dashboard, since the page isn't meant to be reachable while comments are disabled.

Does this remove existing comments from the database?

No. It stops new comments and hides the comment system's surfaces; it doesn't delete data already stored from before the module was enabled.

Does this affect the Recent Comments widget?

Yes. The built-in Recent Comments widget gets unregistered, so it's no longer available to add anywhere.

Does this remove the comment counter from the dashboard?

Yes. The comment count in the "At a Glance" dashboard widget is hidden via inline CSS.

Are pingbacks affected too?

Yes. Trackback support is removed alongside comment support, and the X-Pingback header is dropped from HTTP responses.

Are there any settings beyond turning the module on?

No. It's a single toggle with no additional configuration.

Can I re-enable comments later if I change my mind?

Yes. Turning the module off restores WordPress's normal comment behavior; nothing about the module's operation is destructive to the underlying comment data.

Stop editing every post to turn off comments.Remove the whole system in one toggle.

Use Disable Comments to close the comment system everywhere at once: no form, no feed, no admin menu, nothing left to moderate.