/custom-comment-fields.php Secret
Last active
January 7, 2016 15:09
Star
You must be signed in to star a gist
Remove website URL field from WordPress comment form. Source: https://wordpress.org/support/topic/remove-url-and-email-fields-from-comments-form#post-3956088
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
<?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'); |
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
<?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