WordPress Quickie: Don’t count your own Visits

We all want our stats to be accurate, So we don’t want to count our own visit on our stats.

Fauzi shows us how to do it in WordPress, just copy the php code below and add your Counter Code between it.

[code lang="php"]
< ?php global $user_ID; if ( !$user_ID ) { ?>
site counter code here
< ?php } ?>
[/code]Now, the counter code will disappear if your logged in.

This post was published by on September 24, 2006

About the Author: Thilak Rao works as a Social Media Expert. He is one of the first professional bloggers from India, and he loves to write, travel and click photos. Follow him on Twitter @thilak

  • http://www.techzonline.net TechZ

    Google Analytics plugin has an option to “disable counting blog owners hits”, I always check that. no point seeing myself on the hits :)

  • http://tech-buzz.net Thilak

    I use Stattraq, So no question about Counter Code and stuuf like that… it does it by itself

  • http://unjour.ch Lysiane

    A great tip, I was troubled by some of the counters I use not being able to discard my own visits. I wonder if one can specify which registered users’ visits can be discarded or not…