Moderator
t-p
(@t-p)
what theme are you using?
I”m using a custom theme that I have created starting from BlankSlate
Moderator
t-p
(@t-p)
Try doing something like this in your theme’s comments.php:
<?php if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
printf( _nx( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'comments title', 'twentythirteen' ),
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
?>
</h2>
(@ald0413)
11 years, 1 month ago
HI,
My client would like it if I could only show the number of comments if there are actually comments.
I have tried the function reference from this page, https://codex.ww.wp.xz.cn/Function_Reference/have_comments, but it doesn’t work, and it references twentyten, so I fear the information is out of date.
Would someone be able to point me in the right direction?