Simple Wordpress Hit Counter Plugin

March 9th, 2009 by pjungwir

Arielle asked me to add a hit counter to the blog. Everything out there is so complicated now! I remember the days when a hit counter was just a Perl script in an <img> tag. I didn’t want Javascript or page-by-page tracking or anything fancy. I also wanted something in text, not an image. I couldn’t find anything like this, so I decided I’d write my own Wordpress plugin. I’ll be hosting it on the Wordpress plugins page.

Posted in Uncategorized

11 Responses

  1. baron

    Works great, thank you

  2. Pim Uijttewaal

    Hello,

    I love your plugin. Only thing is, it’s checking the actual domain. In my case I use a trick in wp-config, to support multiple domains. In this case, the counter is only incremented, and displayed, if the URL belongs to the primary domain name. But I guess I can just change the select/update statement to change the where clause ?

    Greetings from the Netherlands.

    Pim

  3. Blob

    I tried to let your counter work in my blog, but failed, so I added a bpath counter there right on top of the comment box :
    http://tcp.c-php.com/wp/?p=572
    Can’t understand why I could not configure yours to appear in the post lines or at the top of bottom of just one post, just like the bpath-counter.

    After having uploaded your directory, I have added the recommended line :

    in that post, but appeared nothing at all as logged as Admin OR unlogged :-(

    Do you have any suggestion?

  4. pjungwir

    Hi Blob,

    When you type the php code, please make sure you’re saying this:

    <?= simplehitcounter_hit(); ?>
    

    and not this:

    < ?= simplehitcounter_hit(); ?>
    

    There should be no space between the opening bracket and the question mark.

    Please let me know how that works.

  5. Blob

    []
    I surely paste your code with NO space, but wordpress set that space while saving the post!
    So it results in :
    []

  6. Karen

    I installed your simple hit counter. Where do I go to see the number of hits? It’s not readily apparent to me. Thanks.

  7. pjungwir

    Hi Karen,

    Thanks for trying out my plugin. Now that you’ve got it installed, you must specify where on your website you’d like it to appear. To do this you must edit your theme’s HTML. For instance, to show it somewhere in the footer, you’d edit footer.php. This is the code you’ll need to type:

    <?= simplehitcounter_hit(); ?>

    If you like, take a look at the HTML for jungwirths.com. Down near the bottom there is something like “6191 visits since 9 March 2009.” In our footer.php, we’ve got this:

    <?= simplehitcounter_hit(); ?> visits since 9 March 2009

    If I’m talking gibberish, let me know. I could give you more detailed help, or you could ask a friend who works with HTML.

  8. Karen

    Uhhh…yeah. I think I need more help. I have no idea where to go to edit my theme’s HTML. Thanks.

  9. Karen

    Okay, with my husband’s help I figured it out and I’m all set!! Thanks :-)

  10. Top 1000 WordPress Plugin Authors « Metode de promovare

    [...] Simple Hit Counter [...]

  11. This Blog proudly uses the following Widget Plugins « alexyz.com

    [...] http://jungwirths.com/2009/03/simple-wordpress-hit-counter-plugin/ [...]