try:
<?php comment_number('%'); ?>
That should give you just the number… If it doesn’t, try this:
<?php comment_number('0','1','%'); ?>
hope that helps!
-A
Thread Starter
Erik
(@buckycat7)
That worked. Thanks so much!
Maybe this will be helpful to someone:
The better way is to use get_comments_number() function. It returns an integer with just number of comments for a given post, while comments_number() returns a NULL variable. It matters if you need to pass comments number to some custom PHP function.
(@buckycat7)
17 years, 9 months ago
I can’t figure out a way to just show the comments number. Meaning I have a graphic in my design for comments and I only want the number of comments to show up in it.
I used this tag:
<?php comments_number('0'); ?>It great if there are no comments, but once a comment is added is says # Comments. How can I get rid of the word comments and just show the number?