Simple Counts plugin

20060128131

Update 4.14.08: Updated for WordPress 2.3+ changing post2cat queries to use term_relationship

While updating the archive* in an attempt to make it at least slightly more navigable, I decided I wanted to display a count of the total comments along with the total post count. As with the post count, I didn’t find any WordPress plugin that gave me just that one simple number. Rather than create a new plugin just for comment counts, I added that functionality to the Total Post plugin and repackaged it as Simple Counts with the idea that it can continue to grow as needed.

Simple Counts works just like Total Posts but offers more data. You can still use < ?php totalposts(); ?> for a count of all posts or < ?php totalposts('1,3'); ?> to excluded specific categories (in the example, categories 1 and 3). What’s new is the inclusion of a similar function for comment counts. < ?php totalcomments(); ?> tallies all comments and < ?php totalcomments('1,3'); ?> excludes categories 1 and 3 from the count. Use either or both functions where ever needed.

Update 02.22.06: Added a category count. Same usage as the others but outputs number of categories minus any exclusions. < ?php totalcats('1,3'); ?>

This plugin outputs count as just that – no formatting or extra HTML. Download it.

If you are using the Total Posts plugin, deactivate or delete it, upload Simple Counts and activate. Your counts will work with no other changes.

*This post isn’t really about the archive, but since it is about WordPress plugins, it should be mentioned the archive now uses a hacked up version of SRG Clean Archives.


Skateboards and bikes are better at nights

Skateboards and bikes are better at nights. 0 comments.


Search WayTooCrowded
The Header Should Always Point Home