Keep Your Commentators Notified!

During today’s little RSS reading ritual I realized something many blogs have in common - they don’t notify their commentators if their comment is thrown in the moderation queue or spam bucket. Now that isn’t very user-friendly, is it?

I really don’t get it at all. It only takes 3 lines of code to display a simple message if a comment needs to be moderated. Simply add this code in your comment.php file for your theme:

<?php if ($comment->comment_approved == '0') : ?>
<em>Your comment is awaiting moderation.</em>
<?php endif; ?>

Now that wasn’t hard, was it? The best place to add it is right next to the commentator’s name, so it appears as “Jeremy Says: Your comment is awaiting moderation.” Just do a search in the comment.php file for “comment_author_link()” and add it right after that.

Please subscribe, or else I will cry. Do you really want to make a programmer cry?

Leave a Reply

Note: By submitting your comment you agree to this blog's comment policy.

If you want a little icon next to your name - sign up for one at Gravatar.