Hello,
Yes. This is because the theme (re-)creates the comment form, therefore any changes by WordPress will not be seen. The only reason seems to be that the theme adds the placeholder attribute to the input fields, because the label is hidden. Hopefully, the author of the theme will update this soon.
For now, I have fixed it myself manually as follows. You can do this yourself under Appearance -> Editor and selecting the theme. I suggest do use a child theme.
- comment out lines 89-100 in Hemingway’s Comments.php file
- in my child theme’s functions.php I added the following code to add the placeholder attribute to author and email (I hide the URL field, but it is easy to do it for that as well):
function addPlaceholderName($field) {
return addPlaceholder($field, __('Name','Hemingway'));
}
function addPlaceholderEmail($field) {
return addPlaceholder($field, __('Email','Hemingway'));
}
function addPlaceholder($field, $text) {
$position = strpos($field, 'value="');
$newField = substr_replace($field, 'placeholder="' . $text . '"', $position, 0);
return $newField;
}
add_filter('comment_form_field_author', 'addPlaceholderName');
add_filter('comment_form_field_email', 'addPlaceholderEmail');
- now the checkbox should appear, but not the label for it. Therefore, add the following to your style.css:
p.comment-form-cookies-consent label {
display: inline !important;
margin-left: 0.5em;
vertical-align: -1px;
}
Hope this helps.
-
This reply was modified 6 years, 10 months ago by
mattsch.
-
This reply was modified 6 years, 10 months ago by
mattsch.
-
This reply was modified 6 years, 10 months ago by
mattsch. Reason: improved code reuse