Now, if I got it, then you have the number of comments for each post already in the $post['total_comments']
element. In this case you do not need the gather_comments
function. Just use the $post['total_comments']
:
<h4 style="text-decoration: none;">(<?php echo $post['total_comments']; ?>
<?php
if($post['total_comments'] == 1) {
echo 'comment';
} else {
echo 'comments';
?>
Correct me if I am wrong.