Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Predefined text in comment field

  • 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!

  • Hi there,

    try adding this PHP Snippet to your site:

    function db_comment_textarea_placeholder( $comment_textarea ) {
        $comment_textarea['comment_field'] = str_replace(
            '<textarea placeholder="Enter your comments here"',
        return $comment_textarea;
    add_filter( 'comment_form_defaults', 'db_comment_textarea_placeholder',99 );  
  • 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!

  • Try this CSS:

    #comments :is(input, textarea)::placeholder {
        color: #f00;
  • Sorry for my late reply: Works and looks awesome.

  • Glad to be of help!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.