Content last modified Monday 6 March 2017
hop to #bottom
About It:
Rate it:
  • Helpful?
  • 1 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

Comments Count

To display the number of comments for an article (for use in an aritcle form), use the following tag: <txp:comments_count />.

This tag will display a number if there is at least one comment to the article. If you would like the number ‘0’ to display when there are zero comments, find /textpattern/publish/taghandlers.php

and replace (approximately line 712):

return ($thisarticle[‘comments_count’] > 0) ? $thisarticle[‘comments_count’] : ‘’;


return $thisarticle[‘comments_count’];

Article Request Count:
Initially released:
Posted here:
03 Dec 2004
Article modified:
03 Dec 2004

You may want to leave your comments/questions at the Forum thread for quicker feedback. Otherwise, comment away:

Commenting is closed for this article.

Commented (2)

This isn’t necessary anymore, this tag (comments_count) will return zero if there are no comments.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.




There are also tag clouds, 'cause those are fun.
Published with Textpattern