WordPress Modification / Hack To Avoid Spam Comments – Manage WordPress Comment By Referer Hack

Wordpres Spam Comments

All WordPress blogs face a potential threat from Spam Comments. WordPress even comes with a comment managing plugin , as they are too sure about it. WordPress Comment system has been the same since its previous versions, which gave a chance to the spammers to automate the commenting work, by tracing out how the comment system works and then framing an automation tool.

Akismet really helps! But, isn't it irritating to see 1000 Comments under spam? So, it shouldn't be like moved into spam, but we should look for a way to block it as a whole. I had a Spammer (A Bot) Named Escog, who comments almost 200+ spam comments, once a new article was published.

So, the basic thing to do with this spam comment problem, is to restrict the users by a validation check that, they use a general browser and hence it avoids all bots. Manual spammers would be less in number and Akismet can sure manage them.

So here is the method:

1. Login to Your Dashboard.

2. Go to themes > Editor

3. Take Functions.php

4. Insert this code, making sure you aren't breaking any open Php Tags.

So it is better to be placed under any ?> so that you can make it sure that you aren't breaking any open Php statements.

So, Now insert this.

function verify_comment_referer() {
if (!wp_get_referer()) {
wp_die( __('We Feel insecurity About Submitting your Comment Now! Sorry!') );
add_action('check_comment_flood', 'verify_comment_referer');

Thats it. Now, No Bots will be making you piss with their spam comments. Enjoy a better level of Blogging!

2 Responses to “WordPress Modification / Hack To Avoid Spam Comments – Manage WordPress Comment By Referer Hack”

  1. thanks so much for the tutorial.
    i'll try it on my website.
    cool website, by the way..
    keep it up..!!

  2. boladowall March 24, 2014

    Spring 2014 Wedding Dresses | Designer Wedding Dresses 2014 at Aisle Style UK - Custom Made Available

Leave a Reply