Latest TweetsHeads up: Blasty (DMCA service) MIA: perishablepress.com/avoid-blas…
Perishable Press

BlogStats PCC Plugin

[ BlogStats PCC ] 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, open source, and completely free.

Update: BlogStats PCC has been rebuilt with all new features and options. Check out Simple Blog Stats for all the action! </update>

BlogStats PCC 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

  1. Copy blogstats-pcc.php to /wp-content/plugins/
  2. Upload and activate via WordPress plugin admin panel
  3. Use the following tags to display your stats anywhere:
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(); } ?>
Check it out: Simple Blog Stats »

Jeff Starr
About the Author Jeff Starr = Fullstack Developer. Book Author. Teacher. Human Being.
Archives
110 responses
  1. Just wondering:

    Is there any way for the plugin to avoid showing comments caught with Akismet? All new spam-comments show on up on my ‘recent comments’-display – before I even get as far as deleting them.

    Great plugin by the way :-)

  2. Jeff Starr

    Peter T,

    BlogStats PCC works anywhere within the <body> of your blog documents. If you would like the plugin to show stats from your blog’s sidebar, for example, you would open the sidebar.php file located within the "/wp-content/themes/your-theme(whatever it is)/> directory, and add this snippet of code:

    <?php fullstats(); ?>

    Otherwise, within the same directory (your theme directory), open the index.php file and place the code in an appropriate location.

    I hope that helps. If you would like more help, please contact me. I would be more than happy to help you get BlogStats PCC working on your blog.

  3. Jeff Starr

    Brom,

    You are absolutely correct — only comments that have been approved should display in the "most recent comments" stats. I have made the required modifications and released a new version (1.7.9) of the plugin, which may be downloaded via the post link above. Thank you for the excellent suggestion!

  4. Incredible, my good man – thanks for the quick update :-D

    Is there any way to donate? Your plugin deserves it!

    Cheers,
    Brom

  5. great plug-in. just installed it!

  6. Thanks so much for the great plugin. Is there any way I can add something to the script to also call the “page” count? Right now it only counts posts but I would like to also show how many “page”s I have.

    Thanks so much!

  7. Jeff Starr

    John,

    Including a "Page Count" stat is an excellent idea — I will look into it and report back within a few days. Stay tuned..

  8. Jeff Starr

    danfef,

    Thanks for the comment — glad you enjoy it!

  9. Jeff Starr

    John,

    Thanks to your feedback, BlogStats PCC now displays the total number of individual static pages. Download the new version (1.9.9) via the main download link above. Thanks for the idea!

  10. Hi..I cannot locate this code anywhere within my wp-admin/index.php:

    I’ve been to my server and located the wp-admin/index.php..but that code is not there. Am I supposed to access that file through my WordPress computer folder..if so also can’t find the file itself. I have a wp/options/index/phpfile..but there’s nothing in it.

    Help..am probably missing something very simple so forgive me.

    This is what’s in my server public_html / wp-admin/indexphp file:

    [ – edited – ]

    Thanks for the help.

  11. Jeff Starr

    mary,

    I assume you are trying to insert the stats function into your admin dashboard as per comment #12, above. If that is indeed the case, then open wp-admin/index.php (either online or offline) and look again for this code (you could even do a find/search for it):

    <div id="zeitgeist">
    <h2><?php _e('Latest Activity'); ?></h2>

    This code is identical in your particular version of WordPress (2.0.1) and should definitely be present (near the top of the document) in order for your site admin to function properly.

    Try logging in to your admin section and see if the dashboard is looking up to snuff. If it feels right, then the specified code should be in the file location indicated. If you are certain that the file lacks such code, you could always unzip a fresh copy and restore it.

    Note: Most of the code you posted in your previous comment was "eaten" by WordPress. From the shreds of php that remain, it appears that you copied only a portion of the entire document. Try checking again, only this time please do not post the code. Thanks;)

  12. A very good and clean plug-in.
    I have translated your plug-in to spanish (Spain). If you’re interested, send me an email.

    Greetings!

[ Comments are closed for this post ]