[Plugin: WordPress.com Stats] Count logged in visitors except admin
-
Hi,
Using WordPress.com stats and I would like to count the logged in visitors as well as those not logged in. But in addition to that, I would like to exclude any views by admins.
I see that on line 85 of stats.php there is the line:
if ( !empty($current_user->ID) || empty($options['blog_id']) )
which I think controls the logged in and logged out statement.
In another section of my blog I am detecting what level of user is logged in using this code:
<?php if (is_user_logged_in()) { ?> <?php global $userdata; ?> <?php if ($userdata->user_level>=7) { ?> Do A <?php } else { ?> Else do B <?php } ?>
and was wondering if I could combine the two, but I don’t think my PHP is quite up to that, although I am going to have a go.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: WordPress.com Stats] Count logged in visitors except admin’ is closed to new replies.