Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove website URL field from WordPress comment form. Source: https://wordpress.org/support/topic/remove-url-and-email-fields-from-comments-form#post-3956088
<?php
//* Remove both website and email fields from WordPress comment form
function prefix_custom_comment_fields($fields) {
unset($fields['url']);
unset($fields['email']);
return $fields;
}
add_filter('comment_form_default_fields', 'prefix_custom_comment_fields');
<?php
//* Remove website URL field from WordPress comment form
function prefix_remove_website_field($fields) {
unset($fields['url']);
return $fields;
}
add_filter('comment_form_default_fields', 'prefix_remove_website_field');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment