如果你不喜欢让“网站”这一项给你制造垃圾留言,可以去掉这一项。方法很简单,在主题的functions.php中写如下代码:
//移除网址URL表单项目
function url_filtered($fields)
{
if(isset($fields[‘url’]))
unset($fields[‘url’]);
return $fields;
}
add_filter(‘comment_form_default_fields’, ‘url_filtered’);
//移除评论昵称的链接
function disable_comment_author_links( $author_link ){
return strip_tags( $author_link );
}
add_filter( ‘get_comment_author_link’, ‘disable_comment_author_links’ );
Hi there, yup this post is actually nice and I have learned lot of things from it on the topic of blogging.
thanks.
感谢分享,谢谢站长!!
不客气,一起努力学习。