Created
September 16, 2019 13:09
-
-
Save termitkin/d433ed5624b8f07d9426d01d2d44193f to your computer and use it in GitHub Desktop.
[WordPress] Remove website and email fields from comments form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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