• 1. Is there a way to disable counting views from admin users? As we edit the pages on a regular basis and don’t want false readings?
    2. Is there a way to disable the counter being shown on the page and just show it on the backend, say on the dashboard, as we really want to know the numbers our customer do not.
    3. Is there a way to move the counter from the bottom to the footer to make it more inconspicuous?
    We have implemented your plugin at http://www.azztech.com.au if you wish to use it as an example of what the plugin does

    https://wordpress.org/plugins/page-views-count/

Viewing 1 replies (of 1 total)
  • I noticed that you have disabled the plugin now. For anyone else facing this issue I am using the provided PHP snippet to display my post counter (pvc_stats_update( $post->ID, 1 );).

    If you want to exclude counts from updating when an admin views the page, I achieved this using the following function:

    // check if the current user is not an admin
    if ( !current_user_can( 'manage_options' ) ) {
    
       // update and display stat counter
       pvc_stats_update( $post->ID, 1 );
    
    } else {
    
       // initialize the stat counter class
       $stats = new A3_PVC();
    
       // just display, do not update stat counter
       echo $stats->pvc_stats_counter( $post->ID );
    
    }

    Evan

Viewing 1 replies (of 1 total)
  • The topic ‘Dont Count Admin Views’ is closed to new replies.