Title: Disable Post Comments
Author: Sumit Singh
Published: <strong>2020 年 1 月 20 日</strong>
Last modified: 2023 年 5 月 25 日

---

搜尋外掛

![](https://ps.w.org/disable-post-comments/assets/banner-772x250.png?rev=2767131)

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://ps.w.org/disable-post-comments/assets/icon-256x256.jpg?rev=2230340)

# Disable Post Comments

 由 [Sumit Singh](https://profiles.wordpress.org/sumitsingh/) 開發

[下載](https://downloads.wordpress.org/plugin/disable-post-comments.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/disable-post-comments/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/disable-post-comments/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/disable-post-comments/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/disable-post-comments/#developers)

 [技術支援](https://wordpress.org/support/plugin/disable-post-comments/)

## 外掛說明

This plugin allows administrators to globally disable comments on any post type (
posts, pages, attachments, etc.) so that these settings cannot be overridden for
individual posts. It also removes all comment-related fields from edit and quick-
edit screens. On multisite installations, it can be used to disable comments on 
the entire network.

Additionally, post-comment-related items can be removed from the Dashboard, Widgets,
the Admin Menu and the Admin Bar.

**Important note**: Use this plugin if you don’t want comments at all on your site(
or on certain post types). Don’t use it if you want to selectively disable comments
on individual posts – WordPress lets you do that anyway. If you don’t know how to
disable comments on individual posts, there are instructions in [the FAQ](https://wordpress.org/plugins/disable-post-comments/faq/).

If you come across any bugs or have suggestions, please use the plugin support forum.
I can’t fix it if I don’t know it’s broken! Please check the [FAQ](https://wordpress.org/plugins/disable-post-comments/faq/)
for common issues.

Want to contribute? Here’s the [GitHub development repository](https://github.com/sssumitsingh/disable-post-comments).

A [must-use version](https://github.com/sssumitsingh/disable-post-comments) of the
plugin is also available.

### Details

The plugin provides the option to **completely disable the commenting feature in
WordPress**. When this option is selected, the following changes are made:

 * All “Comments” links are hidden from the Admin Menu and Admin Bar;
 * All comment-related sections (“Recent Comments”, “Discussion” etc.) are hidden
   from the WordPress Dashboard;
 * All comment-related widgets are disabled (so your theme cannot use them);
 * The “Discussion” settings page is hidden;
 * All comment RSS/Atom feeds are disabled (and requests for these will be redirected
   to the parent post);
 * The X-Pingback HTTP header is removed from all pages;
 * Outgoing pingbacks are disabled.

**Please delete any existing comments on your site before applying this setting,
otherwise (depending on your theme) those comments may still be displayed to visitors.
You can use the Delete Comments tool to delete any existing comments on your site.**

### Advanced Configuration

Some of the plugin’s behaviour can be modified by site administrators and plugin/
theme developers through code:

 * Define `DISABLE_COMMENTS_REMOVE_COMMENTS_TEMPLATE` and set it to `false` to prevent
   the plugin from replacing the theme’s comment template with an empty one.
 * Define `DISABLE_POST_COMMENTS_ALLOW_DISCUSSION_SETTINGS` and set it to `true`
   to prevent the plugin from hiding the Discussion settings page.

These definitions can be made either in your main `wp-config.php` or in your theme’s`
functions.php` file.

## 螢幕擷圖

[[

[[

[[

[[

## 安裝方式

 1. Upload the plugin folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. The plugin settings can be accessed via the ‘Settings’ menu in the administration
    area (either your site administration for single-site installs, or your network
    administration for network installs).

## 常見問題集

### Nothing happens after I disable comments on all posts – comment forms still appear when I view my posts.

This is because your theme is not checking the comment status of posts in the correct
way.

### How can I remove the text that says “comments are closed” at the bottom of articles where comments are disabled?

The plugin tries its very best to hide this (and any other comment-related) messages.

If you still see the message, then it means your theme is overriding this behaviour,
and you will have to edit its files manually to remove it. Two common approaches
are to either delete or comment out the relevant lines in `wp-content/your-theme/
comments.php`, or to add a declaration to `wp-content/your-theme/style.css` that
hides the message from your visitors. In either case, make you you know what you
are doing!

### I only want to disable comments on certain posts, not globally. What do I do?

Don’t install this plugin!

Go to the edit page for the post you want to disable comments on. Scroll down to
the “Discussion” box, where you will find the comment options for that post. If 
you don’t see a “Discussion” box, then click on “Screen Options” at the top of your
screen, and make sure the “Discussion” checkbox is checked.

You can also bulk-edit the comment status of multiple posts from the [posts screen](https://codex.wordpress.org/Posts_Screen).

### I want to delete comments from my database. What do I do?

Go to the tools page for the Disable Post Comments plugin and utlize the Delete 
Comments tool to delete all comments or according to the specified post types from
your database.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Disable Post Comments〉的開發相關工作。

參與者

 *   [ Sumit Singh ](https://profiles.wordpress.org/sumitsingh/)
 *   [ Milankumar Sanandia ](https://profiles.wordpress.org/iihglobal/)

[將〈Disable Post Comments〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/disable-post-comments)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/disable-post-comments/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/disable-post-comments/)，或透過
[RSS](https://plugins.trac.wordpress.org/log/disable-post-comments/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/disable-post-comments/)。

## 變更記錄

#### 1.0.3

 * Fix some issue with latest wordpress version
 * Tested with latest version

#### 1.0.2

 * Fix some issue with Major version WordPress 6.0
 * Tested with latest version

#### 1.0.1

 * Fix some security issue
 * Tested with latest version

#### 1.0.0

## 中繼資料

 *  版本 **1.0.3**
 *  最後更新 **3 年前**
 *  啟用安裝數 **少於 10 次**
 *  WordPress 版本需求 ** 5.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **6.0.12**
 *  語言
 * [English (US)](https://wordpress.org/plugins/disable-post-comments/)
 * 標籤:
 * [comments](https://tw.wordpress.org/plugins/tags/comments/)[disable](https://tw.wordpress.org/plugins/tags/disable/)
   [global](https://tw.wordpress.org/plugins/tags/global/)[specific post](https://tw.wordpress.org/plugins/tags/specific-post/)
 *  [進階檢視](https://tw.wordpress.org/plugins/disable-post-comments/advanced/)

## 評分

這個項目尚無任何評論記錄。

[Your review](https://wordpress.org/support/plugin/disable-post-comments/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/disable-post-comments/reviews/)

## 參與者

 *   [ Sumit Singh ](https://profiles.wordpress.org/sumitsingh/)
 *   [ Milankumar Sanandia ](https://profiles.wordpress.org/iihglobal/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/disable-post-comments/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](https://wplovers.co.uk/)