Created
September 13, 2017 09:14
-
-
Save deeman/805aa218ce37930ccdc374d35f8905e1 to your computer and use it in GitHub Desktop.
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
//Add the following in your child theme’s functions.php | |
add_filter( 'comment_form_default_fields', 'comment_form_custom_fields' ); | |
/** | |
* Remove Email and Website fields in comment form. | |
* | |
* @param array $args Default comment form arguments | |
* @return array Modified comment form arguments | |
*/ | |
function comment_form_custom_fields( $args ) { | |
unset( $args['email'] ); | |
unset( $args['url'] ); | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment