如何攔截WordPress垃圾評論?-使用外掛攔截WordPress垃圾評論

早前,我們已經提到攔截WordPress垃圾評論一共有以下五種辦法,並且已經對WP內建評論功能設定進行了全面的說明。今天我們進行第二種攔截WP垃圾評論的方法——利用外掛來攔截垃圾評論。

  1. 使用WP內建功能攔截垃圾評論的7種方法
  2. 使用外掛攔截WordPress垃圾評論
  3. 使用驗證碼攔截WordPress垃圾評論
  4. 使用第三方評論系統接管WP評論功能
  5. 使用Web應用程式防火牆攔截WordPress垃圾評論

如果您覺得WordPress評論設定功能不足以滿足你的需求,又或者覺得那樣的設定實在太麻煩了,則可以安裝外掛來為您管理評論。這意味著您可以在站點中保持啟用評論的狀態,但又防止垃圾評論,兩全其美。

以下是一些可用於阻止WordPress垃圾評論的外掛。

Akismet

這個外掛相信是大家最熟悉不過的了。預設情況下,每個WordPress安裝中都包含Akismet外掛,它是由Automattic團隊開發的。 它實時分析來自數百萬個站點和社羣的資料,並保護您的WordPress網站免受垃圾評論的侵害。

它是最好的WordPress外掛之一,個人站點完全免費,商業網站的起價為5美元/每月。查閱文章《WordPress必裝外掛之垃圾留言攔截外掛Akismet》瞭解更多關於Akismet的資訊。

如何攔截WordPress垃圾評論?-使用外掛攔截WordPress垃圾評論配圖

 

Akismet外掛

目前,該外掛的啟用安裝量超過500萬,這很大程度得益於它作為WordPress安裝預設外掛。您可以從WordPress外掛庫下載Akismet,也可以在WordPress儀表板中的 “ 外掛”>“安裝外掛”搜尋安裝(WordPress安裝的時候其實已經預設提供,除非你已經刪除了它)。

該外掛在建立垃圾評論規則和過濾器方面具有悠久的歷史,可以很好地確保您看到評論不是垃圾評論。

如果您經營的是商業網站,則需要支付Akismet許可費用,但對於個人部落格來說是免費的。該外掛非常強大,可以攔截WordPress網站中超過99%的垃圾評論。

Disable Comments

Disable Comments 是另外一個免費WordPress外掛,與Akismet不同的是,該外掛的主要功能是讓您全域性禁用文章的評論功能。如果不希望你的WordPress網站使用評論功能,該外掛可以幫助你快速實現。

disable-comments-plugin

Disable Comments外掛

使用外掛移除評論連結

您可以為你的WordPress網站新增程式碼,以快速刪除WordPress評論者連結。當然,一般情況下,不太建議這樣做。因為,這樣做的後果就是,可能你的網站再不會有人評論了。

為此,您可以編寫一個簡簡單單的外掛。

首先在您的wp-content/plugins目錄中為外掛建立一個檔案,將其命名為wbolt-comment-author-link.php之類。

然後在外掛檔案中新增以下程式碼:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
/* Plugin Name: Remove Comment
Author Links Plugin URI: https://www.wbolt.com
Description: This plugin removes links to comment author websites, as a way of reducing the impact of comment spam.
Version: 1.0
Author: wbolt team
Author URI: https://www.wbolt.com
Textdomain: wbolt
License: GPLv2 */
function wbolt_remove_comment_author_link( $return, $author, $comment_ID ) {
return $author;
}
add_filter( 'get_comment_author_link', 'wbolt_remove_comment_author_link', 10, 3 );
function wbolt_remove_comment_author_url() {
return false;
}
add_filter( 'get_comment_author_url', ‘wbolt_remove_comment_author_url');
/* Plugin Name: Remove Comment Author Links Plugin URI: https://www.wbolt.com Description: This plugin removes links to comment author websites, as a way of reducing the impact of comment spam. Version: 1.0 Author: wbolt team Author URI: https://www.wbolt.com Textdomain: wbolt License: GPLv2 */ function wbolt_remove_comment_author_link( $return, $author, $comment_ID ) { return $author; } add_filter( 'get_comment_author_link', 'wbolt_remove_comment_author_link', 10, 3 ); function wbolt_remove_comment_author_url() { return false; } add_filter( 'get_comment_author_url', ‘wbolt_remove_comment_author_url');
/* Plugin Name: Remove Comment 
Author Links Plugin URI: https://www.wbolt.com 
Description: This plugin removes links to comment author websites, as a way of reducing the impact of comment spam. 
Version: 1.0 
Author: wbolt team 
Author URI: https://www.wbolt.com 
Textdomain: wbolt
License: GPLv2 */ 
function wbolt_remove_comment_author_link( $return, $author, $comment_ID ) { 
         return $author; 
} 
add_filter( 'get_comment_author_link', 'wbolt_remove_comment_author_link', 10, 3 ); 

function wbolt_remove_comment_author_url() { 
         return false; 
} 

add_filter( 'get_comment_author_url', ‘wbolt_remove_comment_author_url');

如果需要,您也可以完全刪除評論中URL地址。只需將此程式碼新增到您的外掛即可:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function remove_website_field($fields) { unset($fields['url']);
return $fields;
}
add_filter('comment_form_default_fields', 'remove_website_field');
function remove_website_field($fields) { unset($fields['url']); return $fields; } add_filter('comment_form_default_fields', 'remove_website_field');
function remove_website_field($fields) { unset($fields['url']); 
         return $fields; 
} 
add_filter('comment_form_default_fields', 'remove_website_field');

儲存外掛檔案,然後在“外掛”-“已安裝的外掛”列表啟用該外掛即可。

此外掛可能不適用於某些主題,具體取決於其中評論功能的編碼方式。如果您的WordPress主題使用的是標準評論表單,則它將起作用。如果不是,請嘗試檢視主題評論表單的程式碼以找到正在使用的過濾器鉤子。

如有疑問,請改用第三方外掛。並且除非主題主題是您自己開發的,否則不要編輯主題檔案,否則下次更新主題時將丟失所做的更改(。

其他垃圾評論攔截外掛

Akismet是迄今為止最受歡迎的垃圾評論攔截外掛(很大程度上是因為它已預先安裝),但這並不意味著它是唯一的。您可以嘗試以下選項:

Anti-spam-plugin

Anti-spam plugin

Anti-spam 提供免費和付費版本,付費版本外掛提供對現有評論進行垃圾評論檢查,並且提供24/7技術支援。

WPBruiser-plugin

WPBruiser plugin

 WPBruiser {no-Captcha anti-Spam}使用演算法來發現垃圾評論,從而避免了對Captcha影象依賴。

Antispam-Bee-plugin

Antispam Bee plugin

Antispam Bee這個免費外掛也可以阻止評論垃圾,而且無需將您的資料傳送到第三方網站。

Spam-protection-AntiSpam-FireWall-by-CleanTalk-plugin

Spam protection, AntiSpam, FireWall by CleanTalk plugin

Spam protection, AntiSpam, FireWall by CleanTalk (這外掛名字一條街那麼長)不僅可以與評論一起使用,還相容包括Contact Form 7,Gravity Form s和Mailchimp等表單外掛一起使用。

WordPress-Zero-Spam-plugin

WordPress Zero Spam plugin

WordPress Zero Spam是另一個幫助你免除使用驗證碼的外掛,並且還相容包括Contact Form 7和Gravity Forms在內的表單外掛。

All-In-One-WP-Security-Firewall-plugin

All In One WP Security & Firewall plugin

All In One WP Security & Firewall 是一個多合一的安全性外掛,還可以阻止垃圾評論。

這些外掛旨在與WordPress預設評論表單相容:如果您使用第三方註釋系統,則需要使用該系統隨附的防止垃圾評論功能。

如果閒WP的評論設定功能繁瑣,使用評論攔截外掛,可以快速解決你的煩惱!就小編而言,Akismet這個外掛足以。當然,每個網站的需求不盡相同,實際應該使用哪一種方式來應對垃圾評論,應該因地制宜,對症下藥。

後面我們繼續來探討,如何使用驗證碼攔截WordPress垃圾評論,使用第三方評論系統接管WP評論功能和使用Web應用程式防火牆攔截WordPress垃圾評論。

評論留言