Since WordPress 2.7 exists an API for the comment area. Thereby you can purge the PHP-portion within
comments.php. Jean-Baptiste shows a simple solution to count comments. This solution is very well known and get used pretty much since the first release of WordPress. But if you like to have a filter, which counts only the trackbacks or only the comments, then this solutions is worthless. Besides that, the How To is pretty poor and PHP-rookies could have troubles with it.
Relating to this and because of many questions about this topic I show you two simple functions, which you insert in your
functions.php of your theme. Normally they get used as output in your
Continue reading …