I have added the heading "Comment" above my comments via comment-wrapper.tpl.php

However , how do I go about adding the number of comments to the heading such as :-

"3 Comments"

or

"1 Comments" ?

I am not the strongest developer so any help will be much appreciated .. thanks !

Comments

WorldFallz’s picture

<?php print $node->comment_count . 'Comments'; ?>

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

kevinf7’s picture

Thats easy, thanks !

WorldFallz’s picture

welcome ;-)

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

ericjam’s picture

Could you make this into an if else statement in even there are no comments? I want it to show nothing if there are not comments and then the counter if there is one :D

webthingee’s picture

Looking to put...
#1 by the first comment in a node then
#2 by the second... etc...

jaestevan’s picture

Try something like that in comment.tpl.php:

<h3>#<?php print $id; ?></h3>

HTML markup is only an example. Take a look at:
http://api.drupal.org/api/file/modules/node/node.tpl.php/6

Hope this helps.

DREAMBOY-1’s picture

This code is great, but does not work with the module usernode_guestbook, can you improve it?