Wordpress and spam

I disclose Wordpress shows waiting for moderation comments to their autor. It shows regardless these comments are not approved yet. Spam-robots consider this behaviour like successful attempt to post a spam. On the one hand this feature is user-friendly, but on the other hand I think this is not very important.
So, I to tear up by the roots this capability.

Edit wp-content/themes/your_template/comments.php.
Was (line 27 in my file):

<?php foreach ($comments as $comment) : ?>

<li class=”<?php echo $oddcomment; ?>” id=”comment-<?php comment_ID() ?>”>
<cite><?php comment_author_link() ?></cite> Says:
<?php if ($comment->comment_approved == ‘0′) : ?>
<em>Your comment is awaiting moderation.</em>
<?php endif; ?>

<br />

<small class=”commentmetadata”><a href=”#comment-<?php comment_ID() ?>” title=”"><?php comment_date(’F jS, Y’) ?> at <?php comment_time() ?></a> <?php edit_comment_link(’e',”,”); ?></small>

<?php comment_text() ?>
<p><?php comment_type(); ?> <?php _e(”by”); ?> <?php comment_author_link() ?>
<?php if (comment_subscription_status()) { echo “<small>(Subscription to comments is on)</small>”; } ?></p>
</li>

<?php /* Changes every other comment to a different class */
if (’alt’ == $oddcomment) $oddcomment = ”;
else $oddcomment = ‘alt’;
?>
<?php endforeach; /* end for each comment */ ?>

Now: (changed places are bold):

<?php foreach ($comments as $comment) :
if ($comment->comment_approved != ‘0′) : ?>

<li class=”<?php echo $oddcomment; ?>” id=”comment-<?php comment_ID() ?>”>
<cite><?php comment_author_link() ?></cite> Says:
<br />

<small class=”commentmetadata”><a href=”#comment-<?php comment_ID() ?>” title=”"><?php comment_date(’F jS, Y’) ?> at <?php comment_time() ?></a> <?php edit_comment_link(’e',”,”); ?></small>

<?php comment_text() ?>
<p><?php comment_type(); ?> <?php _e(”by”); ?> <?php comment_author_link() ?>
<?php if (comment_subscription_status()) { echo “<small>(Subscription to comments is on)</small>”; } ?></p>
</li>

<?php /* Changes every other comment to a different class */
if (’alt’ == $oddcomment) $oddcomment = ”;
else $oddcomment = ‘alt’;
endif;
endforeach; /* end for each comment */ ?>

You cannot save your blog from spam completely by this way, but “smart” robots leave your alone.

Leave a Reply


Attention! You are prohibited from using "[url=http..." or "[url]http..." in comment's body or it will be deleted as spam and your IP blacklisted!