Content last modified Tuesday 24 August 2021
hop to #bottom
Categories:
Author:
Author's website
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’] : ‘’;

with

return $thisarticle[‘comments_count’];

Article Request Count:
Initially released:
2004-12-03
Posted here:
03 Dec 2004

You know you want to visit the Archives.
Published with Textpattern