If you look in the title, there are 0 comments, but if you are going down each post, really there are comments.
I do not know where is the error in the template.
This is the comments.php template. I do not know if something is wrong:
[ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]
<section id="comments" class="comments-area">
<?php // You can start editing here -- including this comment! ?>
<?php if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
printf( _n( 'Una respuesta en “%2$s”', '%1$s respuestas en “%2$s”', get_comments_number(), 'superb' ),
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
?>
</h2>
<ol class="commentlist">
<?php wp_list_comments( array( 'callback' => 'superb_comment', 'style' => 'ol' ) ); ?>
<!-- /.commentlist -->
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-below" class="navigation" role="navigation">
<h1 class="assistive-text section-heading"><?php esc_html_e( 'Comment navigation', 'superb' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( esc_html__( '← Older Comments', 'superb' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments →', 'superb' ) ); ?></div>
</nav>
<?php endif; // check for comment navigation ?>
<?php // If comments are closed and there are comments, let's leave a little note.
elseif ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
<p class="nocomments"><?php esc_html_e( 'Comments are closed.', 'superb' ); ?></p>
<?php endif; ?>
<?php comment_form(); ?>
</section> <!-- /#comments.comments-area -->
Thank you very much for your help.
The topic ‘Problem with comments-count’ is closed to new replies.
(@hechoparapeques)
9 years, 10 months ago
Hello,
I have a problem with comments counter that appears next to each blog title.
This is the link:
https://www.hechoparapeques.com/reposteria/
If you look in the title, there are 0 comments, but if you are going down each post, really there are comments.
I do not know where is the error in the template.
This is the comments.php template. I do not know if something is wrong:
[ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]
Thank you very much for your help.