Skip to content

Instantly share code, notes, and snippets.

@termitkin
Created September 16, 2019 13:09
Show Gist options
  • Save termitkin/d433ed5624b8f07d9426d01d2d44193f to your computer and use it in GitHub Desktop.
Save termitkin/d433ed5624b8f07d9426d01d2d44193f to your computer and use it in GitHub Desktop.
[WordPress] Remove website and email fields from comments form
function website_and_email_remove($fields) {
if(isset($fields['url'])) {
unset($fields['url']);
}
if (isset($fields['email'])) {
unset($fields['email']);
}
return $fields;
}
add_filter('comment_form_default_fields', 'website_and_email_remove');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment