Title: double stats
Last modified: August 21, 2016

---

# double stats

 *  [lizanta](https://wordpress.org/support/users/lizanta/)
 * (@lizanta)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/double-stats-1/)
 * Hi,
    I’m using the Kento PVC 2.7, nice plugin! but all my stats results are double!.
   Please let me know how to fix that. (plugin link” [https://wordpress.org/plugins/kento-post-view-counter/](https://wordpress.org/plugins/kento-post-view-counter/))
 * Thank you in advance

Viewing 13 replies - 1 through 13 (of 13 total)

 *  [Maxmalte](https://wordpress.org/support/users/maxmalte/)
 * (@maxmalte)
 * [12 years ago](https://wordpress.org/support/topic/double-stats-1/#post-5138302)
 * I’ve the same issue, same version…
 *  [Maxmalte](https://wordpress.org/support/users/maxmalte/)
 * (@maxmalte)
 * [12 years ago](https://wordpress.org/support/topic/double-stats-1/#post-5138303)
 * _**EDIT:**_
    Oops, I forget my theme and plugin. My theme: BlogoLifePRO V 1.1.4
   by WPlook Team Plugins:
    - Antispam Bee
    - Cookie Law Info
    - Disqus Comment System
    - Jetpack by WordPress.com
    - Lightbox Plus Colorbox
    - mqTranslate
    - Redirection
    - Report Content
    - Stop Self Pings
    - TinyMCE Advanced
    - Tumblr Crosspostr
    - Tumblr Widget
    - WordPress iSell – Sell Digital Downloads
    - WordPress SEO
    - WP-Memory-Usage
    - WP CleanFix
    - WP Hide Post
    - XML Sitemap & Google News feeds
 * Always newest versions…
 * WordPress 3.9.2.
 * Greetings
 *  [vincent.jiang](https://wordpress.org/support/users/vincentjiang/)
 * (@vincentjiang)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/double-stats-1/#post-5138319)
 * double counted, same here.
 *  [vincent.jiang](https://wordpress.org/support/users/vincentjiang/)
 * (@vincentjiang)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/double-stats-1/#post-5138320)
 * is this plug still being maintained?
 *  [vincent.jiang](https://wordpress.org/support/users/vincentjiang/)
 * (@vincentjiang)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/double-stats-1/#post-5138321)
 * I have fixed the issue in my site.
 * the root cause for the double count is that. in this plusin, it add filter to
   default the_content function.
    add_filter(‘the_content’, ‘kento_pvc_display’);
 * in function kento_pvc_display, it insert data to database.
 * therefore, if you page or post have code call the_content twice or three times.
   your count will double or triple. the fix is to put follow code in the beginning
   of kento_pvc_display function.
 * function kento_pvc_display($cont){
    global $index;
 * $index = $index+1;
 * if($index>1)
    { return $cont; }
 * …
 * It will fix the problem and improve your website performance.
 *  [vincent.jiang](https://wordpress.org/support/users/vincentjiang/)
 * (@vincentjiang)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/double-stats-1/#post-5138322)
 * the plugin owner own me on this. 🙂
 *  Thread Starter [lizanta](https://wordpress.org/support/users/lizanta/)
 * (@lizanta)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/double-stats-1/#post-5138323)
 * Yes he does!
    Thank you, it worked well now.
 *  [beniEllis](https://wordpress.org/support/users/beniellis/)
 * (@beniellis)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/double-stats-1/#post-5138357)
 * I applied the fix from above to the index.php file in the kento plugin folder
   replacing
 * `function kento_pvc_display($cont){`
 * with
 *     ```
       function kento_pvc_display($cont){
       global $index;
   
       $index = $index+1;
   
       if($index>1)
       {
       return $cont;
       }
       ```
   
 * The counter on my post completely disappeared from the page. Did I miss something?
 * Thanks.
 *  [ryanlegal32](https://wordpress.org/support/users/ryanlegal32/)
 * (@ryanlegal32)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/double-stats-1/#post-5138358)
 * Anyone can you please let us know where the proper placement is?
 *  [nuonis](https://wordpress.org/support/users/nuonis/)
 * (@nuonis)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/double-stats-1/#post-5138360)
 * vincent.jiang and lizanta, what file should the code be placed in? i have the
   same problem as beniEllis. Your help is appreciated!
 *  [ryanlegal32](https://wordpress.org/support/users/ryanlegal32/)
 * (@ryanlegal32)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/double-stats-1/#post-5138361)
 * PLEASE HELP US SOLVE THIS ISSUE 🙁 my site loads 2x the stats every hit. My post
   are loaded via ajax. Not sure why this happens.
 *  [ryanlegal32](https://wordpress.org/support/users/ryanlegal32/)
 * (@ryanlegal32)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/double-stats-1/#post-5138362)
 * I got it to work
 * I replaced
    function kento_pvc_display($cont){ with function kento_pvc_display(
   $cont){ global $index;
 * $index = $index+1;
 * if($index>1)
    { return $cont; }
 * then i used the readme file to and inserted the php code for the counter where
   i needed it. and… it worked…!!!
 *  [beniEllis](https://wordpress.org/support/users/beniellis/)
 * (@beniellis)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/double-stats-1/#post-5138363)
 * Still no luck. The least I can get is 2 hits per visit and I actually got it 
   up to 4. Pretty frustrated. 🙁

Viewing 13 replies - 1 through 13 (of 13 total)

 The topic ‘double stats’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/kento-post-view-counter_d6baba.svg)
 * [Kento Post View Counter](https://wordpress.org/plugins/kento-post-view-counter/)
 * [Support Threads](https://wordpress.org/support/plugin/kento-post-view-counter/)
 * [Active Topics](https://wordpress.org/support/plugin/kento-post-view-counter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/kento-post-view-counter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/kento-post-view-counter/reviews/)

 * 13 replies
 * 6 participants
 * Last reply from: [beniEllis](https://wordpress.org/support/users/beniellis/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/double-stats-1/#post-5138363)
 * Status: not resolved