CMS Scripts

Remove the url field from comment in WordPress

Remove the url field from comment in WordPress

Remove the URL field from comment in WordPress. This small function removes the URL field from the comments. You will avoid to receive comment spammers.

File to edit: functions.php

PHP

1
2
3
4
5
function remove_comment_fields($fields) {
    unset($fields[‘url’]);
    return $fields;
}
add_filter(‘comment_form_default_fields’,‘remove_comment_fields’);

Leave a Reply