| 开发者 |
webcraftic
alexkovalevv creativemotion themeisle |
|---|---|
| 更新时间 | 2026年1月12日 22:53 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv2 |
define('DISABLE_COMMENTS_REMOVE_COMMENTS_TEMPLATE', false);
You can add this definition either to your wp-config.php file or to your theme’s functions.php file.
Support
We’re here to help. Feel free to open a new thread on the Support Forum.
Useful Resources
If you only want to disable comments on specific posts, you don’t need to use this plugin. WordPress lets you turn off comments for individual posts directly in the editor. Open the post, check the Post settings panel on the right, and look for the Discussion label. There you can check “Closed” for that single post. The plugin is only needed if you want to disable comments globally or control comments by post type.
If the comment form still appears after disabling comments, it usually means your theme is not respecting WordPress’s built-in comment settings. Some themes include their own hard-coded comment form or do not properly check whether comments are enabled before outputting the form. Because this is a theme-level issue, the plugin cannot remove comment forms that a theme outputs manually. The plugin successfully disables comments in WordPress itself, but themes that ignore WordPress standards may continue to display the comments. We recommend switching themes or contacting your theme's creator to report this issue.
The plugin hides comment-related messages wherever possible. If you still see the “Comments are closed” text, it means your theme is outputting that message directly and overriding WordPress’s default behavior. To remove it, you’ll need to make a small change to your theme. The most common approaches are:
Yes. The delete comments tool is separate from the disable feature.
Yes. All comment disabling settings are reversible. If you decide to allow comments again, simply toggle the disable options off.
When a comment contains an external link, WordPress normally outputs it as a clickable <a href="…"> tag. Search engines can still detect and follow these links even when they are marked rel="nofollow". To prevent this, the plugin can replace those links with safe, non-clickable <span> elements.
The original URL is preserved inside a data-uri attribute, so a link like:
<a href="https://example.com">Example</a>
becomes:
<span data-uri="https://example.com">Example</span>
You can choose whether to replace links inside the comment text, the comment author profile URL, or both. This keeps everything looking the same for visitors but removes the link functionality so search engines cannot treat them as real outbound links. The replacement happens only on the front end and does not modify the actual comment stored in your database.