Spam solution in comments

Today I revisited my website since I don’t know when, probably since February 2010, or even January 2010(I have been really busy with other stuff!) and found out that I have 176 comments which waited for me to be moderated, by default I think it was set up to be moderated by admin in the first place, can’t recall if I did it or WordPress comes that way which is more likely. So I gave it a try and right on the first page I discovered that almost all of them were spam posts, maybe couple of them were from readers appreciating my posts and asking for suggestion/advises.

The more suitable title for this article I think would be “How to remove URL/Website box from comment form in WordPress” or “How to fight spam in comments of WordPress CMS”

Most of spam posts relied on URLs that they could put in the post itself and in the URL/Website field of comment form, so the user’s name would become link too.

So the first thing that came to my mind was to disable that URL/Website box in comment form. After googling around for 5 mins I found solutions how to do that but most of them were for WordPress’s default theme which made it a little complicated for me because I’m not using default theme. But it would be still comments.php file in your current theme. However most of the solutions included either function: comment_author_url() or variable: $comment_author_url. Quick Function lookup from Documentation which is built in WordPress, makes it very easy

And from the description I understand that this is the function that I need to comment out in the whole comments.php file and I found 2 places where this function or variable is used. So I just commented them with HTML comment tag <!– …. –>

The second thing what I did was to allow post comments to anyone but hold only those comments that contain even 1 URL.

I understand that this not the best solution but still will work to some extent. And it was really quick and easy to implement. Also I’m very new to WordPress CMS, still gotta learn a lot.

If someone could suggest me any video course/CBT(Computer Based Training) that they think it’s worth watching I would really appreciate that help.

This entry was posted in WordPress, misc. Bookmark the permalink.

One Response to Spam solution in comments

  1. MrX says:

    hello , bla bla bla

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>