-
GZeitung
Hi beloved support team!
Is there any possibility to insert a predefined text in the comment field?
Maybe something like „Enter your comments here..“?
Thank you!
-
David
Hi there,
try adding this PHP Snippet to your site:
function db_comment_textarea_placeholder( $comment_textarea ) { $comment_textarea['comment_field'] = str_replace( '<textarea', '<textarea placeholder="Enter your comments here"', $comment_textarea['comment_field'] ); return $comment_textarea; } add_filter( 'comment_form_defaults', 'db_comment_textarea_placeholder',99 );
-
GZeitung
Hi David,
absolutely perfect! Thank you very much for your fast reply.
Is there a CSS to modify text color of the placeholder and of the fields “Name” and “E-Mail”?
Kind regards!
-
David
Try this CSS:
#comments :is(input, textarea)::placeholder { color: #f00; }
-
GZeitung
Sorry for my late reply: Works and looks awesome.
-
David
Glad to be of help!
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.