0

i have two websites i use Wordpress comments on one website and jetpack comments on another. Both websites shows website column, how do i remove it to save my site from giving unwanted backlinks ?

  • Are you talking about the website "field" ? – Lucien Dubois Feb 8 '19 at 3:50
  • Yes, because a lot of spammers use that field to obtain backlinks. – Fahad Ur Rehman Khan Feb 8 '19 at 6:30
1

1. Using Plugins to disable Website field from comments

There are many plugins available in the WordPress repository that remove the Website field from the blog comments.

The most easy way is to install Remove Fields or Remove Comment Website/URL Box.

https://wordpress.org/plugins/remove-fields/

2. Editing the WordPress Files to remove the Website field from comments

  • open functions.php file and add code.

add_filter('comment_form_default_fields', 'website_remove');

function website_remove($fields)
{
if(isset($fields['url']))
unset($fields['url']);
return $fields;
}
| improve this answer | |
  • Can i disable it with CSS ? – Fahad Ur Rehman Khan Feb 8 '19 at 10:43
  • You can hide the field with CSS, but it's still part of the DOM. Using the filter is a better solution (no need for a plugin just for this!) as it remove the field from the DOM rather than just hiding it. – Alexander Holsgrove Feb 8 '19 at 10:49
2

I guess you are talking about the website "field". If it is so, add this code in the functions.php file to remove the field:

add_filter('comment_form_default_fields', 'remove_website_field');
function remove_website_field($fields){
    if(isset($fields['url']))
    unset($fields['url']);
    return $fields;
}
| improve this answer | |
  • Is there any other way than this to remove it ? – Fahad Ur Rehman Khan Feb 8 '19 at 6:17
  • This is the best way to remove the field. You can remove it from the core if you really wanted (don't do that), but this is exactly what filters are meant for. Why do you need another method? – Alexander Holsgrove Feb 8 '19 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.