aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/blog/views/default/object/blog.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php
index 02f74b95e..eee866054 100644
--- a/mod/blog/views/default/object/blog.php
+++ b/mod/blog/views/default/object/blog.php
@@ -32,7 +32,12 @@ $date = friendly_time($blog->publish_date);
// The "on" status changes for comments, so best to check for !Off
if ($blog->comments_on != 'Off') {
$comments_count = elgg_count_comments($blog);
- $comments_link = "<a href=\"{$blog->getURL()}#annotations\">" . sprintf(elgg_echo("comments"), $comments_count) . '</a>';
+ //only display if there are commments
+ if($comments_count != 0){
+ $comments_link = "<a href=\"{$blog->getURL()}#annotations\">" . elgg_echo("comments") . " (". $comments_count .")</a>";
+ }else{
+ $comments_link = '';
+ }
} else {
$comments_link = '';
}