If you sign up for a blog, before it would say in your stats in your sidebar:
1 Posts
1 Pages
1 Comments
Now it says:
1 Post
1 Page
1 Comment
And those change to plural once you rise above one. Hacked up this conditional code for it (Wordpress MU):
<strong>Stats for <a href=”<?php bloginfo(’url’); ?>/”>this blog</a>:</strong><br />
<?php echo $countposts = $wpdb->get_var(”SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = ‘publish’ AND post_type = ‘post’”);
if ($countposts == ‘1′) echo ” Post”;
else echo ” Posts”; ?><br /><?php echo $countpages = $wpdb->get_var(”SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = ‘publish’ AND post_type = ‘page’”);
if ($countpages == ‘1′) echo ” Page”;
else echo ” Pages”; ?><br /><?php echo $countcomments = $wpdb->get_var(”SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = ‘1′”);
if ($countcomments == ‘1′) echo ” Comment”;
else echo ” Comments”; ?><br />
Not the most efficient way, but it gets the job done, which is what counts. thripp.com just got a bit smarter.


