You are currently browsing the sidebar tag archives.

Super Simple WordPress Counter

Posted 2009.04.23 17.40 in Computers/Internet/Technology by Stephanie

I’ve been using a fairly complex cgi counter program, and spent some time today making a WordPress widget that would interface with it so as to have my fancy counter displayed in the sidebar.

After playing with it for a while, adding more and more options, I realized that I was really over-complicating it. I don’t need all the fancy capabilities of the cgi counter, and it would be easier to build a solution that didn’t have to rely on outside components.

So I started over, and made a super simple counter that can be added to a WordPress-powered site as a plugin. The ‘full featurelist’ is as follows:

  • Super simple to install – just upload the plugin, activate it, then activate the widget.
  • No other files to load, no complicated data / font directories required.
  • Position it like any other sidebar widget.
  • Output is styled via your theme’s CSS file.
  • Only appears on your site’s ‘front page’ (whether it’s a blog page or a static page).
  • Remembers last visitor so page ‘reloads’ won’t increment the counter.
  • Easy to configure, via the WordPress Widget admin screen.

There isn’t really much to configure:

  • You can set a title, or use the default (Counter)
  • You can specify the number of digits, or leave it at the default (6 digits)
  • You can select whether or not to use a comma to separate the thousands
  • You can manually change the counter number (*)

(* this option is to allow you to switch from another counter to this one without having to start over at 1. Obviously, tinkering with the number more than once is cheating.)

I’ve named it StephCounter and anyone interested can download it here: Please note, it comes with no support, no warranty, and (at the moment) no instructions. It is released under the GPL license and uses PHP.