Search code examples
commentsfacebook-comments

How to hide Facebook Comments count if post has no comments yet


I have configured my web application to display Facebook comments and comment count in the post details template... It is displaying perfectly when there is a comment, but I would like to hide the "x Comments" part when there is no comment posted.

< fb:comments-count href="[ARTICLELINK]"/>< /fb:comments-count> Comments

This is my template to display the comment count...

In my application's own comments feature, I could use the [hascomments][commentcount]Comments[/hascomments] template...

However, I couldn't find which token to use for Facebook comments.


Solution

  • The span is given the class 'fb_comments_count_zero' if there are no comments, so you can set that class to be display:none in your styleshet