The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Add comments count next to article title

Add comments count next to article title 11 years 2 months ago #18599

  • Igor Popovski
  • Igor Popovski's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 0
On my website, below the article title are the social sharing icons (facebook, twitter, +1, etc.).

I think it would be great if I could place the number of comments on that article next to the social icons.

This way, if the article has big number of comments, the user would be more interested in reading it, as well as scrolling down to see the comments.

The question is:
Is it possible to add the number of comments below the article title that will act as link as well to the comments below the article?


Add comments count next to article title 11 years 2 months ago #18678

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
I guess the easiest way to do that would be by looking at this:
You could add this function to a template override and then at the place where you want the counter do:
<?php echo cu_GetCommentCount($this->item->id, 'com_content'); ?>

$this->item is the object that holds all the information about the article.

Kind regards,
  • Page:
  • 1
Time to create page: 0.095 seconds