Title: Conditional Comments Message
Author: jp2112
Published: <strong>2014 年 5 月 19 日</strong>
Last modified: 2015 年 1 月 17 日

---

搜尋外掛

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

![](https://s.w.org/plugins/geopattern-icon/conditional-comments-message.svg)

# Conditional Comments Message

 由 [jp2112](https://profiles.wordpress.org/jp2112/) 開發

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

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

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

## 外掛說明

This plugin lets you display a conditional message when you have comments set to
close automatically. After you publish a post, and while comments are open, it will
show how long comments are open. After the comments section automatically closes,
it will say “This article is closed to future comments.”

Use it for:

 * Displaying how long comments are open
 * Show a different message depending on whether comments are open or closed
 * Dynamically count down the number of days remaining in the comment period

You can also add additional text that will display only when comments are open.

### If you need help with this plugin

If this plugin breaks your site or just flat out does not work, create a thread 
in the [Support](https://wordpress.org/support/plugin/conditional-comments-message)
forum with a description of the issue. Make sure you are using the latest version
of WordPress and the plugin before reporting issues, to be sure that the issue is
with the current version and not with an older version where the issue may have 
already been fixed.

**Please do not use the [Reviews](https://wordpress.org/support/view/plugin-reviews/conditional-comments-message)
section to report issues or request new features.**

## 螢幕擷圖

[⌊Plugin settings page⌉⌊Plugin settings page⌉[

Plugin settings page

## 安裝方式

 1. Upload plugin file through the WordPress interface.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Go to Settings » Conditional Comments Message, configure plugin.
 4. Go to Settings » Discussion and tick the “Automatically close comments on articles
    older than [ ] days” checkbox, and put a value there
 5. Check a post or page that allows comments and one that doesn’t.

## 常見問題集

#### How do I use the plugin?

Go to Settings » Conditional Comments Message and enter the text you want to see
below the comment form. Make sure the “enabled” checkbox is checked.

#### I entered some text but don’t see anything on the page.

Is the page/post cached?

Did you set the number of days comments are set to automatically close? See the 
Installation page for instructions.

#### How can I style the output?

The text is wrapped in div tags with class name “ccm-conditional-msg”. Use this 
class in your local stylesheet to style the output how you want.

#### I don’t want the admin CSS. How do I remove it?

Add this to your functions.php:

    ```
    remove_action('admin_head', 'insert_ccm_admin_css'); 
    ```

#### What does the ‘dynamic remaining days’ checkbox do?

Instead of just showing how many days the comment period is open, this will instead
dynamically count down the number of days remaining. So if you set your comment 
window to 30 days, then it will initially say “4 weeks”. As time passes, the message
dynamically adjusts itself from “weeks” to “days”. The post date is used to determine
the number of days remaining and the countdown.

## 使用者評論

![](https://secure.gravatar.com/avatar/e43333e9e9144e4ba6ab42f0199bfc42efe3561ae5f4584fcb76b6110c8a9823?
s=60&d=retro&r=g)

### 󠀁[HTML tags!](https://wordpress.org/support/topic/html-tags-7/)󠁿

 [jirkaxxl](https://profiles.wordpress.org/jirkaxxl/) 2016 年 9 月 3 日

“Closed comments message” unfortunately does not process the HTML tags (displayed
as plain text). I need to insert a link to a contact form and e-mail address.

 [ 閱讀全部 1 則使用者評論 ](https://wordpress.org/support/plugin/conditional-comments-message/reviews/)

## 參與者及開發者

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

參與者

 *   [ jp2112 ](https://profiles.wordpress.org/jp2112/)

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

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

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

## 變更記錄

#### 0.0.9

 * confirmed compatibility with WordPress 4.1

#### 0.0.8

 * updated .pot file and readme

#### 0.0.7

 * fixed validation issue

#### 0.0.6

 * added option to make number of days dynamic; i.e. if setting is 30 days, then
   it will dynamically count down until the close date

#### 0.0.5

 * improved logic for determining when to display message
 * minor code optimizations

#### 0.0.4

 * permanent fix for Undefined Index issue
 * admin CSS and page updates

#### 0.0.3

 * code fix

#### 0.0.2

 * updated support tab

#### 0.0.1

 * created

## 中繼資料

 *  版本 **0.0.9**
 *  最後更新 **12 年前**
 *  啟用安裝數 **少於 10 次**
 *  WordPress 版本需求 ** 4.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **4.1.42**
 *  語言
 * [English (US)](https://wordpress.org/plugins/conditional-comments-message/)
 * 標籤:
 * [after](https://tw.wordpress.org/plugins/tags/after/)[comments](https://tw.wordpress.org/plugins/tags/comments/)
   [conditional](https://tw.wordpress.org/plugins/tags/conditional/)[message](https://tw.wordpress.org/plugins/tags/message/)
 *  [進階檢視](https://tw.wordpress.org/plugins/conditional-comments-message/advanced/)

## 評分

 3 星，滿分為 5 星

 *  [  0 個 5 星使用者評論     ](https://wordpress.org/support/plugin/conditional-comments-message/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/conditional-comments-message/reviews/?filter=4)
 *  [  1 個 3 星使用者評論     ](https://wordpress.org/support/plugin/conditional-comments-message/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/conditional-comments-message/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/conditional-comments-message/reviews/?filter=1)

[撰寫評分](https://wordpress.org/support/plugin/conditional-comments-message/reviews/#new-post)

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

## 參與者

 *   [ jp2112 ](https://profiles.wordpress.org/jp2112/)

## 技術支援

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

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

## 贊助

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

 [ 贊助這個外掛 ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7EX9NB9TLFHVW)