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!
(@robahas)
13 years, 3 months ago
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):
I’m totally confused. Shouldn’t that work? Thanks for helping!