Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1423810

    Hi,

    How can I change the word ‘Site’ in the wordpress comments form box?
    https://novosite.graphitheque.net/wp-content/uploads/2023/10/Screenshot-1.jpg

    Thanks

    #1423814


    also how can I place the terms inside the boxes?
    https://novosite.graphitheque.net/wp-content/uploads/2023/10/Screenshot-1-1.jpg

    Thanks

    #1423858

    Hi diogovareta,

    You can do it by adding this code in your child theme’s functions.php (just replace the values inside placeholder):

    add_filter( 'comment_form_default_fields', 'enfold_comment_placeholders' );
    
    function enfold_comment_placeholders( $fields ) {
        $fields['author'] = str_replace(
            '<input',
            '<input placeholder="Name"',
            $fields['author']
        );
        $fields['email'] = str_replace(
            '<input',
            '<input placeholder="Email Address"',
            $fields['email']
        );
        $fields['url'] = str_replace(
            '<input',
            '<input placeholder="Website"',
            $fields['url']
        );
        return $fields;
    }

    Then hide the labels with this CSS code:

    #commentform .comment-form-author label, 
    #commentform .comment-form-email label, 
    #commentform .comment-form-url label {
        display: none;
    }

    Hope it helps.

    Best regards,
    Nikko

    #1423918

    Hi Nikko

    Great help, that works!
    Just need the class to adjust font-size and color terms.

    Thanks

    #1424022

    Hi,
    Try this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:

    #commentform ::-webkit-input-placeholder {
      color:    #000;
      font-size: .8em;
    }
    #commentform :-moz-placeholder {
      color:    #000;
      font-size: .8em;
    }
    #commentform ::-moz-placeholder {
      color:    #000;
      font-size: .8em;
    }
    #commentform :-ms-input-placeholder {
      color:    #000;
      font-size: .8em;
    }
    

    After applying the css, please clear your browser cache and check.

    Best regards,
    Mike

    #1424036

    Hi Mike,

    Thanks for your support. That works great for the fixed terms.
    Ho can I apply it (font-size and color) also for the input text?
    Kind Regards

    #1424043

    Hi,
    Try this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:

    #top .main_color #commentform input[type='text'],
    #top .main_color #commentform textarea {
      color:    #000;
      font-size: .8em;
    }
    

    After applying the css, please clear your browser cache and check.

    Best regards,
    Mike

    #1424127

    Hi Mike,

    Thanks for your great support.
    Have a great day!

    kind Regards

    #1424153

    Hi,

    Great, I’m glad that Mike could help you out. Please let us know if you should need any further help on the topic, or if we can close it.

    Best regards,
    Rikard

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