How to Remove the Website URL Field and Clickable Links from WordPress comment box

withoutplugin

(Santhosh veer) #1

Here is Simple Guide to remove the Website URL Field and Clickable Link From the WordPress Comment Box

It will Help us to reduce the Spam Comments in our Wordpress website.

Remove Website URL Field From Wordpress Comment Box

Just and Paste this Below code on themes functions.php file

Code 1

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

If the above Code not Working means then try this Below code

Code 2

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

Remove Clickable Links From Wordpress Comment Box

Add this Below line on themes functions.php file

remove_filter('comment_text', 'make_clickable', 9);

(OR)

Download and Install this Plugin

Go to Plugins > Add New > Upload Plugin

Download Plugin

Thanks
Santhosh veer


Useful Code Snippets and Functions For your WordPress Site :tada: