Internet

Remove a Site URL in a WordPress Comment Area

If your WordPress site receives a lot of spam comments and backlinks, you might want to remove the Site URL portion from the comments area. You can do that with the code I’m going to give you below. Add this code to the .php functions of your theme.

/* Site URL Removal */
add_filter('comment_form_default_fields', 'unset_url_field');
function unset_url_field($fields){
if(isset($fields['url']))
unset($fields['url']);
return $fields;
}

Benzer Yazılar

Leave a Comment