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 prefer not to use asterisk markers on required fields in the comment form.

So I'd like to remove or alter the 'required fields are marked (*)' message.

Being a good wordpress user, I'd like to do it with my functions.php. I can work out how to filter most areas of the form, but not this. I'm guessing it will involve modifying the 'comment-notes-before' field of the 'defaults' array, but I can't quite see how to do that.

share|improve this question
you need to use the comment_form_default_fields to do that. this probably the ugliest function in WP... – onetrickpony Jun 29 '11 at 10:53
up vote 2 down vote accepted

What you need to use is comment_form_defaults filter that has large and nested $defaults array passed. That array will have (among other things) something like this in it:

      author << this will have something like <span class="required">*</span> in it
      email << this will have something like <span class="required">*</span> in it
 comment_notes_before << this will have something like Required fields are marked<span class="required">*</span> in it

So in your filter you need to change these fields in array you got passed and return whole array.

share|improve this answer

Here is an example of how you can modify the notes before the comment form.

function wpse_comment_notes( $args ) {
    $args['comment_notes_before'] = "All fields are required, though I haven't marked them";
    return $args;
add_filter('comment_form_defaults', 'wpse_comment_notes');
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.