wordpress去掉评论人名链接的方法
2010年5月14日
6 条评论
对出于群发链接目的留言很郁闷,邮箱里大量的垃圾评论通知,还要一个一个的删除,想一劳永逸可以这个方法。
1,删除文章页面的链接,修改模板目录下的functions.php
找到<a id=”commentauthor-<?php comment_ID() ?>” class=”url” href=”<?php comment_author_url() ?>” rel=”external nofollow”>
去掉里面的href=”<?php comment_author_url() ?>”参数即可
2,网站首页的评论签名链接去掉需要修改文件,
在WP-include目录下有一个comment-template.php文件,在这里查找这句
function get_comment_author_link() {
往下几行找到
$return = “<a href=’$url’ rel=’external nofollow’ class=’url’>$author</a>”;
修改成
$return = “$author”;
即可。
New Comments