UPDATES EasyBlog 6.0.11 Released! Update to the latest version now!

Helpdesk

Your Time
Our Time
Response Time
24 — 48 hours
We strive to provide the fastest ever response possible. However, we are not super beings.

Allow at least 24 — 48 hours
  Support is online
Our support specialists is available now. We will attend to you as soon as we can.
  Support is online

Total number of comments showed is wrong

Niccolo Angeli · ·
9:12 PM Thursday, 02 August 2018
Normal
Hello,
I have customized my article template to show the total number of comments after the title, but the number showed is wrong (it always shows "12 comments";) -
see https://accademiainfinita.it/blog/12-coscienza/1016-la-notte-buia-dell-anima, or any other article from the blog https://accademiainfinita.it/blog

Here is the code I am using


<?php
// call Komento comment model
$commentsModel = KT::model('Comments');
$commentCount = $commentsModel->getCount('com_content', $this->item->id);

?>
<!-- Render Komento comments single article page -->
<dd>
<i class="fa fa-fw fa-comments-o"></i> <a href="#comments"><span class="commentCounter" data-kt-counter><?php echo $commentCount; ?> </span><?php echo JText::_('COM_KOMENTO_COMMENTS'); ?></a>
</dd>
<!-- Render Komento comments on single article page - end -->


this code in inserted in
/templates/rt_galatea/html/layouts/joomla/content/info_block.php

which si called in
/templates/rt_galatea/html/com_content/article/default.php

I attach both files for your reference

Thank you
The replies under this section are restricted to logged in users or users with an active subscription with us