/* Disable Website Field from Comment Form*/
add_action( 'after_setup_theme', 'wpflt_remove_website_field_comment_form' );
function wpflt_remove_website_field_comment_form() {
add_filter( 'comment_form_default_fields', 'wpflt_disable_url_comment_form', 20 );
}
function wpflt_disable_url_comment_form($fields) {
unset($fields['url']);
return $fields;
}
Use this code in your child theme’s ‘functions.php‘ to disable Website URL Field in the default WordPress comment form. This kind of helps to reduce spam.
You may also need to change the default text where it says to save Name, Email and Website as a cookie. When you don’t let your visitors to leave their website address, what’s the point in having that ‘Website’ text in Cookie consent?
To change the default WordPress comment cookie consent, use this code.