Comments are a catch-22. They can make the web great or terrible. The whole the web kinda rest of the civility of commenting. I can’t tell you how many sites I’ve cleaned the comments from. As much as I love the feature in WordPress, I most often recommend that commenting be disabled for the majority of informational websites. I ran a bunch of newspaper websites at one point and the comment sections were the biggest issue. I suggested that they outsource that dialogue to a social media channel. There are some inherent risk of allowing commenting in that you really need to attend to your website.
Here’s how I style all of the comments for Boostrap:
<?php comment_form( $args = array(
'id_form' => 'commentform',
'id_submit' => 'commentsubmit',
'title_reply' => '<div class="mt-3 fw-light fs-4">Leave a Reply</div>',
'title_reply_to' => '<div class="fw-light fs-6">Leave a Reply to %s</div>',
'cancel_reply_link' => '<div class="btn btn-sm btn-outline-secondary mt-3 fw-light fs-6">Cancel</div>',
'label_submit' => 'Post Comment',
'comment_field' => '<p><textarea placeholder="Start typing..." id="comment" class="form-control" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',
'comment_notes_after' => '<div class="form-allowed-tags alert fw-light small">' . 'Your email address will not be published. All fields marked with * are required. You may use:'.allowed_tags().'</div>',
'comment_notes_before' => '',
'class_container' => 'form-control',
));
?>
Here’s how I disable all commenting:
You can leave a comment below ?
- comment_form – https://developer.wordpress.org/reference/functions/comment_form/
- comments_template – https://developer.wordpress.org/reference/functions/comments_template/