Close Comments After X Amount Of Days

One thing I recently implemented on my WordPress blog is to close comments on posts older than 30 days. After 24 hours, I noticed my spam comments has dropped dramatically to zero. That’s a good thing.

To close comments on posts after x amount of days, all you have to do is access your WordPress Dashboard > Settings > Discussion page. Look for the option saying “automatically close comments older than  x days.” Here’s a snapshot of the page.


Just check it to turn on the feature. Supply the number of days that you want the comments to be turned on. Comments will be turned off on posts older than x number of days that you’ve provided. Simple enough. This is just another tool to help lower your blog’s spam comments. It certainly did on my blog.

Emptying Spam

My new favorite function in the WordPress Admin is Emptying Spam which you’ll find under the Comments section. There is nothing so something satisfying and gratifying as this particular function. The latest click resulted in the trashing of 2019 spam comments. That needed a quick celebration.

Javascript and WordPress Threaded Comments

Sometime after WordPress 2.7 and before WordPress 2.9.2, I lost a key functionality within WordPress. It’s threaded comments.  I blame myself for constantly tinkering around with the theme. I must have deleted a key piece of code somewhere in the theme that prevented threaded comments from working.

For those not familiar with WordPress, the threaded comments functionality allows the “comment form” to jump underneath a specific comment when a “Reply” link is clicked. Clicking “Cancel Reply” restores the “comment form” to its original position. When a comment is submitted, the comment is placed directly underneath that specific comment.

In my case, the threaded comment function still worked, sort of, but not quite the way it was supposed to. I did some digging around. After reading a couple of articles, I finally found what was missing in my WordPress theme. It’s a tiny Javascript command that you place in header.php.

This tiny Javascript makes the comment form jump from one place to another. Make sure this code is in header.php just before the <?php wp_head(); ?> command.

<?php if ( is_singular() ) wp_enqueue_script( ‘comment-reply’ ); ?>

Signing Up To Comment

If there is one thing that really discourages me from making a comment on someone else’s blog, it is when I’m asked to register. I really hate that. For some reason, that really bugs me. I realized joining a website serves two purposes: First, it’s one way of fighting comment spam. Second, it’s a great way to get people to join a website, a method employed by myspace and others.

Shouldn’t comments be spontaneous? Shouldn’t it be easy? I must admit there were times I was pregnant with thought only to be discouraged when asked to register. It just plain kills the mood. Take note ESPN. I just read a nice article by Jen Chang about USA Soccer and was just about to comment only to be stopped dead on the track by an online form.

Am I the only one who feel this way?