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 WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

How to decorate the comment window and how to set it up

  • As you can see from the screenshots and reference sites, I want to decorate the commenting area like that. I hope you will let me know step by step. It would be more appreciated if you utilize the screenshots. Thanks for always helping me.

  • Try adding this through Appearance > Customize > Additional CSS:

    .comments-area .comment-author-info {
        display: flex;
        align-items: center;
    }
    
    .comments-area .comment-author-info > :first-child{
        margin-right: 10px;
    }
    
    .comments-area input#submit {
        margin-left: auto;
    }
    
    .comments-area p.form-submit {
        display:flex;
    }

    For the secret feature, you’ll need a custom solution for that. It would be best to get a developer for this. I would suggest asking for recommendations on our Facebook Group as well: https://web.facebook.com/groups/generatepress

  • Oh, thank you. I uploaded a new screenshot. As you can see from the screenshot, I would like to be able to comment by simply entering the name without entering the e-mail and website. How do I do it?

  • I already did that. Even if you don’t enter that, comments are written. But I want to get rid of those boxes.

  • You didn’t do either of them:

    1. you didn’t tick this option:
    https://app.screencast.com/IKeRViOQJGS56

    2. you didn’t add the snippet:
    https://app.screencast.com/zn7fepd90sXRz

    Please read this article again and do what it suggests:
    https://docs.generatepress.com/article/remove-e-mail-and-url-field-from-comment-form/

  • thank you. I added a new screenshot, please check it out.

  • To add a placeholder, add below PHP snippet and change Your comment here and Your name to the actual placeholder text of the fields.

    add_action( 'after_setup_theme', 'yh_add_comment_placeholder' );
    function yh_add_comment_placeholder() {
        add_filter( 'comment_form_defaults', 'custom_comment_form_defaults', 20 );
    }
    
    function custom_comment_form_defaults($defaults) {
    	 $commenter = wp_get_current_commenter();
        $req = get_option( 'require_name_email' ); // Check if name is required
    	
        $defaults['comment_field'] = '<p class="comment-form-comment">
            <label for="comment">' . _x('Comment', 'noun') . '</label>
            <textarea id="comment" name="comment" placeholder="' . __('Your comment here', 'generatepress') . '" cols="45" rows="8" aria-required="true"></textarea>
        </p>';
    	
    	 $defaults['fields']['author'] = '<p class="comment-form-author">' .
            '<label for="author">' . __( 'Name', 'generatepress' ) . '</label> ' .
            ( $req ? '<span class="required">*</span>' : '' ) .
            '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" placeholder="' . __('Your name', 'generatepress') . '" size="30"' . $aria_req . ' /></p>';
        
        return $defaults;
    }
    
    
  • thank you. Check out the new screenshots.

  • Remove this line from the code:
    <label for="comment">' . _x('Comment', 'noun') . '</label>

  • It’s solved thank you so much. you are an angel

  • You are welcome   🙂

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