当我的Wordpress博客开始受大家关注的时候,经常会有一些垃圾留言发布,一看就是用Robot自动发布的广告或垃圾链接,而WordPress对这却束手无策,这样我们只有自己动手,用wp imgcode增加一层验证码屏障,把Robot垃圾留言拒之门外!
wp imgcode插件的功能就是在留言页面再添加上验证码功能。
下载连接:wp-imgcode.zip
安装方法:
1、和激活其他插件一样后台激活插件。
2、接下来修改当前使用主题的评论模版(comments.php),将
<p><textarea name=”comment” id=”comment” cols=”100%” rows=”10″ tabindex=”5″></textarea></p><p><input name=”submit” type=”submit” id=”submit” tabindex=”5″ value=”Submit Comment” />
<input type=”hidden” name=”comment_post_ID” value=”<?php echo $id; ?>” />
</p><?php do_action(’comment_form’, $post->ID); ?>
</form>
改为
<p><textarea name=”comment” id=”comment” cols=”100%” rows=”10″ tabindex=”5″></textarea></p><?php do_action(’comment_form’, $post->ID); ?>
<p><input name=”submit” type=”submit” id=”submit” tabindex=”5″ value=”Submit Comment” />
<input type=”hidden” name=”comment_post_ID” value=”<?php echo $id; ?>” />
</p></form>
保存模版后,刷新评论页面就可以看到验证码了。

@whisperer
垃圾不算多的话,可以用AK。误杀的问题确实存在。
说实话不喜欢验证码,所以用Ak,不过有时候会误杀
我是用function.php防spam的,效果还不错