WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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', 'wpsites.net' ) . '</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', 'wpsites.net' ) . '</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', 'wpsites.net' ) . '</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;


Source http://wpsites.net/web-design/customize-comment-form-place-holder-input-text-fields-labels/

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

protected by Community Dec 19 '15 at 20:27

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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