Get the Average Number of Comments Per Post in WordPress
July 28th, 2009 by MattComments are often a good metric of how engaged your readers are. The more comments you get per post, the better you are doing as a blogger. If you get a high average of comments per post, then your readers are interesting in your content, they’re reading it through, and they want to discuss the topic more.
Wouldn’t it be a neat trick if you could total up the average number of comments per post on your blog? It’s not too hard. WP Recipes has a little code snippet that does just that.
<?php $count_posts = wp_count_posts(); $posts = $count_posts->publish; $count_comments = get_comment_count(); $comments = $count_comments['approved']; echo 'Average '.round($comments/$posts).' comments per post.'; ?>
Twitter
TwitterI think I have my automated backup system fully set up. /var/www, /etc, and a dir with MySQL dumps are synced to Amazon S3 daily by cron.
Follow Matt on Twitter