Reply To: How to remove the site and e-mail fields from the WordPress comment form.

Home Forums Iconic One Pro Support How to remove the site and e-mail fields from the WordPress comment form. Reply To: How to remove the site and e-mail fields from the WordPress comment form.

#5296

Easiest way:

Paste this custom CSS in live customizer Additional CSS section


.comment-form-email, .comment-form-url {
    display: none;
}

Also visit Settings > Discussion > Other Comment Settings to check if comments are allowed without providing email.

Another way, removal from source code using a filter:

Paste the following code in functions.php of Iconic One Pro at the bottom:


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