Fix layout for single article images and style comments section
This commit is contained in:
34
comments.php
34
comments.php
@@ -3,26 +3,26 @@
|
||||
* The template for displaying comments
|
||||
*/
|
||||
|
||||
if ( post_password_required() ) {
|
||||
if (post_password_required()) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="comments" class="comments-area reading-container">
|
||||
|
||||
<?php if ( have_comments() ) : ?>
|
||||
<?php if (have_comments()): ?>
|
||||
<h2 class="comments-title">
|
||||
<?php
|
||||
$comment_count = get_comments_number();
|
||||
if ( '1' === $comment_count ) {
|
||||
if ('1' === $comment_count) {
|
||||
printf(
|
||||
esc_html__( 'One thought on “%1$s”', 'wisdom1' ),
|
||||
esc_html__('One thought on “%1$s”', 'wisdom1'),
|
||||
'<span>' . get_the_title() . '</span>'
|
||||
);
|
||||
} else {
|
||||
printf(
|
||||
esc_html( _nx( '%1$s thought on “%2$s”', '%1$s thoughts on “%2$s”', $comment_count, 'comments title', 'wisdom1' ) ),
|
||||
number_format_i18n( $comment_count ),
|
||||
esc_html(_nx('%1$s thought on “%2$s”', '%1$s thoughts on “%2$s”', $comment_count, 'comments title', 'wisdom1')),
|
||||
number_format_i18n($comment_count),
|
||||
'<span>' . get_the_title() . '</span>'
|
||||
);
|
||||
}
|
||||
@@ -33,7 +33,7 @@ if ( post_password_required() ) {
|
||||
<?php
|
||||
wp_list_comments(
|
||||
array(
|
||||
'style' => 'ol',
|
||||
'style' => 'ol',
|
||||
'short_ping' => true,
|
||||
'avatar_size' => 60,
|
||||
)
|
||||
@@ -45,20 +45,22 @@ if ( post_password_required() ) {
|
||||
the_comments_navigation();
|
||||
|
||||
// If comments are closed and there are comments, let's leave a little note, shall we?
|
||||
if ( ! comments_open() ) :
|
||||
if (!comments_open()):
|
||||
?>
|
||||
<p class="no-comments"><?php esc_html__( 'Comments are closed.', 'wisdom1' ); ?></p>
|
||||
<p class="no-comments"><?php esc_html__('Comments are closed.', 'wisdom1'); ?></p>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
endif; // Check for have_comments().
|
||||
|
||||
comment_form(
|
||||
array(
|
||||
'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">',
|
||||
'title_reply_after' => '</h2>',
|
||||
)
|
||||
|
||||
$args = array(
|
||||
'class_form' => 'comment-form mt-4 p-4 rounded bg-white shadow-sm border',
|
||||
'class_submit' => 'btn btn-secondary fw-bold text-uppercase mt-3',
|
||||
'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title h3 font-serif mb-4">',
|
||||
'title_reply_after' => '</h2>',
|
||||
'comment_field' => '<div class="comment-form-comment mb-3"><label for="comment" class="form-label fw-bold">Your Perspective <span class="text-danger">*</span></label><textarea id="comment" name="comment" cols="45" rows="6" maxlength="65525" required="required" class="form-control bg-light"></textarea></div>',
|
||||
);
|
||||
comment_form($args);
|
||||
?>
|
||||
|
||||
</div><!-- #comments -->
|
||||
</div><!-- #comments -->
|
||||
Reference in New Issue
Block a user