I’ve always got quite a lot of comment spam on the blog, and this is mostly for older posts that I assume are already dead and wouldn’t be commented on. If you go back far enough, you find all sorts of rubbish on this blog since its been running since before I did web development as a proper living.

In order to stem some of this (its still nice to double check what Askimet thinks is spam actually is) – I thought it would be a good idea to disable the ability to add new comments to older posts.

I think at the moment, anything over a month can probably have this function disabled, so I added the following bit of code in my single.php theme file.

Which seems to be working quite nicely at the moment!

Image Credit: Werner Kunz