How to Remove the Website Field From the Comment Form in WordPress Blog

Bloggers main problm is Spam comments, so here is a way to block spam comments using a simple code. with the help of this code , it will remove the website field from your wordpress blog. 1x1.trans How to Remove the Website Field From the Comment Form in Wordpress Blog

1x1.trans How to Remove the Website Field From the Comment Form in Wordpress Blog

To remove the website field from the comment form, paste the below code into your functions.php file.

function remove_comment_fields($fields) {
    unset($fields['url']);
    return $fields;
}
add_filter('comment_form_default_fields','remove_comment_fields');

For Genesis Framework Users

if you are using Genesis theme then paste the below code in your functions.php file. (the functions.php file can be found in your child theme)

add_filter( 'genesis_comment_form_args''url_filtered' );
add_filter( 'comment_form_default_fields''url_filtered' );
function url_filtered( $fields ) {
if ( isset( $fields['url'] ) )
unset( $fields['url'] );
if ( isset( $fields['fields']['url'] ) )
unset( $fields['fields']['url'] );
return $fields;
}

For Thesis Users

To hide the website field with css, please paste the below code in your custom.css file

.custom #commentform input[name="url"],  .custom #commentform label[for="url"] { display:none; }
About Rohith V R

I’m glad you're here! I'm Rohith a 18 old young Entrepreneur, currently living in Thrissur, Kerala, India. if you like this article please it with social media, subscribe to our feeds

Speak Your Mind

*