Have you ever seen sites that show off their total RSS subscribers count, twitter follower count, and other vanity counts? Well let’s add one more to that list. Total comment counts. If you have a very engaged community, then it is a great idea to show off the total number of comments in your WordPress sidebar.
All you have to do is open your sidebar.php file, and paste the following code:
<?php $comments_count = wp_count_comments(); echo $comments_count->approved . " Comments, care to join in?"; ?>
Feel free to style the code in any way you like. Let us know if you have any questions.