Update (2012/11/08): BlogStats PCC has been rebuilt with all new features and options. Check out Simple Blog Stats for all the action! </update>
Announcing the BlogStats PCC plugin for WordPress! BlogStats PCC is the easy way to display the total number of posts, comments, categories, as well as several other great statistics for your WordPress-powered website. With BlogStats PCC, you display only the information you want, where you want — inside or outside of the WordPress loop. Completely customizable, BlogStats PCC will display any combination of statistics you choose. This plugin is highly flexible, simple to use, and completely free.
Update: New version of BlogStats PCC now available! The new version now provides all of these great site statistics:
- Total number of posts
- Total number of comments
- Total number of categories
- Total number of members
- Total number of guests
- Total number of pages
- Date of most recent update
- Most recent commentator
- Most recent post
Display any or all of the provided site statistics — customize your own set to provide only the statistics you want!
Installation and Usage
- Unzip blogstats-pcc.zip and copy blogstats-pcc.php to your plugins directory.
- Upload and activate via WordPress plugin admin panel.
- Add any of the following calls to wherever you would like the information displayed:
Display the entire set of statistics in a nice list format:
<?php if (function_exists('fullstats')) { fullstats(); } ?>
Display the total number of posts, comments, and categories:
<?php if (function_exists('blogstats')) { blogstats(); } ?>
Display the total number of posts:
<?php if (function_exists('poststats')) { poststats(); } ?>
Display the total number of comments:
<?php if (function_exists('commstats')) { commstats(); } ?>
Display the total number of categories:
<?php if (function_exists('catstats')) { catstats(); } ?>
Display the total number of registered users:
<?php if (function_exists('regusers')) { regusers(); } ?>
Display the total number of unregistered users:
<?php if (function_exists('userstats')) { userstats(); } ?>
Display the total number of individual, static pages:
<?php if (function_exists('pagestats')) { pagestats(); } ?>
Display the date of the most recent post modification:
<?php if (function_exists('modstats')) { modstats(); } ?>
Display a link to the most recently published blog post:
<?php if (function_exists('recpost')) { recpost(); } ?>
Display the name of the most recent commentator as a link:
<?php if (function_exists('reccomm')) { reccomm(); } ?>
Display the date of the last update in your blog's default date format:
<?php if (function_exists('recstats')) { recstats(); } ?>
Download the Latest Version
WP Plugin - BlogStats PCC - version 2.3.1 - 4KB ZIP
110 Responses
billy – May 17, 2007 •
great little plugin. i have a 2 questions i want to ask before i go screwing up the php file.
1. changing the number of recent posts and comments listed
2. You had said that “guests” is actually users who have registered. how do i change “guests” to something that would reflect that, like “registered Users”?
Perishable – May 23, 2007 •
billy,
not sure if i am understanding the first question.. the number of posts/comments is generated from database statistics. changing the number of either requires altering the actual number of posts/comments in the database itself (e.g., by adding/deleting posts).
the second question is easy. open the file and go to line #114. change the word "guests" to whatever you prefer. no additional editing should be necessary.
Arkan – May 28, 2007 •
Hello,
thanks for this great plugin Perishable ;)
I translate this in French: [Edit: getting 404 for original page link — see download section of the article above for the translated version]
It is also available on the official French WordPress site.
Perishable – May 29, 2007 •
Arkan,
Very nice! Thank you for your help. The translation is excellent. Keep up the good work!
Regards,
Jeff
Christopher – June 17, 2007 •
Finally I have found a great plugin to show a the stats about my blog – thank you.
I like the way I can list posts and pages separately, but it seems to miss out a whole load of sub pages. Any ideas??
Perishable – June 18, 2007 •
Yes, open the plugin file, find the function called
function pagestats(), and replace this line:$numpages = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'static'");with this one:
$numpages = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE (post_status = 'static') AND (post_parent >= '0')");That should do the trick. Let us know how it goes..
Christopher – June 18, 2007 •
Thanks for the amended code, unfortunately no change. Still showing 6 pages.
If I change it to
(post_parent >= '1')it then says 2 pages.At the moment your plugin is reporting:
59 posts and 6 pages in 11 categories with 56 comments
While the WP Dashboard reports:
There are currently 43 posts and 56 comments, contained within 11 categories.
Probably should have said I am using WP2.1
Thanks for your help.
Perishable – June 18, 2007 •
I don’t have WordPress 2.1 running for this site (yet), but I may have an opportunity later tonight or tomorrow to investigate the situation on a different domain. It should be just a matter of culling the desired page data from the correct database tables, which indeed may have been changed in WP2.1. I’ll see what I can do.. stay tuned..
David – July 18, 2007 •
Exellent, it works very well. Very usefull tool ;)
Manele – September 11, 2007 •
i just installed this plugin on my blog and i love it! thank you!
Perishable – September 11, 2007 •
Excellent, Manele — I love to hear positive feedback! Thanks for the comment!
J.M. Snyder – September 22, 2007 •
Hi,
Great plug-in! However, I’m using the “poststats” function and it’s returning the number of all my posts AND my pages.
Your plug-in stats: 57 posts, 0 pages
WordPress dashboard: 50 posts
I have 1 post that’s marked private and 1 page marked private, for a total of 51 posts and 8 pages.
Any clue why this may be happening?
Thanks in advance!
J.M. Snyder