Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I use the Twenty Ten theme, customized.

The theme text is: Your email address will not be published.

With the email box below, this gives readers the impression that they must enter an email address, yet I set my settings so one is not required.

I'd like to edit the text to read:

You do not have to leave an email address in order to reply.

Can this be done? If so, how?

Thank you.

share|improve this question

2 Answers 2

At the bottom of comments.php, replace:

<?php comment_form(); ?>


<?php comment_form(array('comment_notes_before' => 'You do not have to leave an email address in order to reply.')); ?>
share|improve this answer
Thanks, Gavin, but that didn't fix it. Text remains the same. – Avery Aug 9 '11 at 3:40
That certainly works - just tested it out. Maybe ensure that your comments.php is what is being used to display the comments box? – GavinR Aug 9 '11 at 12:53
@:Avery : check your file correctly.@:GavinR :is correct.:) – Ramkumar Sep 29 '11 at 9:40

Place this code at the end of your child themes functions.php file. You can change the placeholder text for each field to suit your own needs.

    function wpsites_modify_comment_form_fields($fields){

$fields['author'] = '<p class="comment-form-author">' . '<label for="author">' . __( 'Author', '' ) . '</label> ' . 

( $req ? '<span class="required">*</span>' : '' ) .

'<input id="author" name="author" type="text" placeholder="Real name, please, no keyword spamming!" value="' . 

esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>';

$fields['email'] = '<p class="comment-form-email"><label for="email">' . __( 'Address', '' ) . '</label> ' .

( $req ? '<span class="required">*</span>' : '' ) .

'<input id="email" name="email" type="text" placeholder="You do not have to leave an email address in order to reply" value="' . 

esc_attr(  $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>';

$fields['url'] = '<p class="comment-form-url"><label for="url">' . __( 'Domain', '' ) . '</label>' .

'<input id="url" name="url" type="text" placeholder="Please Link To Your Own Domain" value="' . 

esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>';

return $fields;



Or you can modify the comment note before using this code in your child themes functions file.

    function wpsites_modify_text_before_comment_form($arg) {
$arg['comment_notes_before'] = '<p class="comment-notes">' . __( 'You do not have to leave an email address in order to reply.' ) . '</p>';
return $arg;

    add_filter('comment_form_defaults', 'wpsites_modify_text_before_comment_form');
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.