In an effort to combat comment spam, I’d like to hide or remove the “Website” field from the “Leave a Reply” section for page and site comments.
I have no desire to increase others page rankings by having them embed their URLs in my sites comments, which seems to be what 99% of the comments on my site are wanting to do.
I’m using the Twenty Ten theme if that makes any difference in the answer.
Thanks!
4 s
Create a file in wp-content/plugins/
with this code:
<?php
/*
Plugin Name: Get Rid of Comment Websites
*/
function my_custom_comment_fields( $fields ){
if(isset($fields['url']))
unset($fields['url']);
return $fields;
}
add_filter( 'comment_form_default_fields', 'my_custom_comment_fields' );
Normally, I’d say put it into your theme’s functions.php file, but I wouldn’t recommend doing that for a theme that could update like Twenty Ten. This way will let you add this functionality as a plugin which can be disabled.