• robahas

    (@robahas)


    Hi – I need to add place holder text to the author, email and comments fields of the comments form. I see helpful instructions in various places but I can’t get any of them to work. They just do… nothing. Here is the code in it’s simplest form (if I could get this to work, then I would use replacement to add the placeholder, this is just an easy way to test):

    function my_fields($fields) {
        $fields['email'] = '';  //removes email field
        $fields['url'] = '';  //removes website field
    return $fields;
    }
    add_filter('comment_form_default_fields','my_fields');

    I’m totally confused. Shouldn’t that work? Thanks for helping!

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Yes it should. In fact, it works for me. Do you have any plugins or a theme that may be hooking the same filter, negating your efforts somehow?

Viewing 1 replies (of 1 total)
  • The topic ‘Filtering comment form pieces’ is closed to new replies.