Title: Total views doesn&#8217;t updates
Last modified: June 25, 2018

---

# Total views doesn’t updates

 *  [felzend](https://wordpress.org/support/users/felzend/)
 * (@felzend)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/total-views-doesnt-updates/)
 * The total views count doesn’t updates, it’s always 1 views, while the today’s
   views updates instantly.
 * I would like to both getting updated at same time.
 * Plugin version: 2.5.6.

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

 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/total-views-doesnt-updates/#post-10434506)
 * Site URL? What setting do you have for tracker type?
 *  Thread Starter [felzend](https://wordpress.org/support/users/felzend/)
 * (@felzend)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/total-views-doesnt-updates/#post-10436281)
 * There are screenshots below showing my settings.
 * > [View post on imgur.com](https://imgur.com/k5Df0zp)
 * > [View post on imgur.com](https://imgur.com/BQv5TvH)
 * > [View post on imgur.com](https://imgur.com/EflwMj6)
 * > [View post on imgur.com](https://imgur.com/nmIUfyf)
 * The following screenshot shows the current problem. My “Today’s views” updates
   normally, but my “Total Views” does not. A simple case is the one below, which
   shows my “Total Views” (1) always one and my “Today’s views” (22) updates normally.
 * > [View post on imgur.com](https://imgur.com/8Vo2aEz)
 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/total-views-doesnt-updates/#post-10442855)
 * Two things to try:
 * 1. Change to Query based in the tracker type
    2. Check your table wp_top_ten 
   in the database using phpMyAdmin to see that there are three columns and that
   you have a primary key
 * I’ll still need the URL to test if the Total views tracking is giving an error,
   but I suspect it is.
 *  Thread Starter [felzend](https://wordpress.org/support/users/felzend/)
 * (@felzend)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/total-views-doesnt-updates/#post-10458063)
 * Hello, sorry for all the time passed.
 * I discovered that problem is because the plugin seems to be counting each view
   on the “total views” as one row, instead of using one row per post, like you 
   can see on the following screenshot: **[https://i.imgur.com/POpanDR.png](https://i.imgur.com/POpanDR.png)**.
 * This issue was causing slow query on the WordPress, so I put an index on the 
   table and it’s very better now.
 * But well, for solve this problem (since I wish to see both Total Views and Today
   Views on the Admin Panel and Today Views works okay) I modified the action that
   calls the function that runs the query to return the number of views, doing like
   this.
 *     ```
       remove_action( 'manage_posts_custom_column', 'tptn_value', 10, 2 );
               add_action( 'manage_posts_custom_column', [$this, 'tptn_value'], 10, 2);
       ```
   
 * **And for Total Count, I changed my query for this one.**
 * _That’s not the correct way, but since the plugin is counting one view per row
   on “total\_views” table, I needed to do this._
 * `SELECT postnumber, SUM(cntaccess) as sum FROM {$table_name} WHERE postnumber
   = %d AND blog_id = %d GROUP BY postnumber`
 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/total-views-doesnt-updates/#post-10467397)
 * This could be a problem with the PRIMARY key. Can you check if this is missing
   in the table? and if so needs to be added. There is a button under tools that
   does this
 * You can also use the button to “merge duplicate IDs”
 * [https://ps.w.org/top-10/assets/screenshot-9.png?rev=1820156](https://ps.w.org/top-10/assets/screenshot-9.png?rev=1820156)
 *  [K-byte](https://wordpress.org/support/users/k-byte/)
 * (@k-byte)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/total-views-doesnt-updates/#post-10481998)
 * Same thing is happening with my site. The total count has been working, but suddenly
   stopped a couple days ago. Daily counts are still registering. If I switch to
   Query Based type, will I lose the count that I already have? Any other suggestions?
 * Thanks!
 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/total-views-doesnt-updates/#post-10496477)
 * [@k-byte](https://wordpress.org/support/users/k-byte/), you won’t lose counts
   if switching.
 *  [wdennis](https://wordpress.org/support/users/wdennis/)
 * (@wdennis)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/total-views-doesnt-updates/#post-10607860)
 * Ajay (@ajay)
    1 month, 2 weeks ago This could be a problem with the PRIMARY key.
   Can you check if this is missing in the table? and if so needs to be added. There
   is a button under tools that does this
 * You can also use the button to “merge duplicate IDs”
 * [https://ps.w.org/top-10/assets/screenshot-9.png?rev=1820156](https://ps.w.org/top-10/assets/screenshot-9.png?rev=1820156)
 * I have this problem, too. I tried the above and it did not fix the problem. The
   website is [http://www.hopeprescott.com](http://www.hopeprescott.com). Can you
   suggest a next step? I took the %totalcount% out of view so not to confuse visitors.
    -  This reply was modified 7 years, 9 months ago by [wdennis](https://wordpress.org/support/users/wdennis/).
 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/total-views-doesnt-updates/#post-10608493)
 * Can you please try the below.
 * First backup your database.
 * Export the data from the tables wp_top_ten and wp_top_ten_daily using phpmyadmin
   or similar.
 * Then deactivate and uninstall the plugin. Remember to select the options under
   General to delete everything. This should also delete both tables.
 * Then do a fresh install of the plugin. Post this import the data back into the
   tables.

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

The topic ‘Total views doesn’t updates’ is closed to new replies.

 * ![](https://ps.w.org/top-10/assets/icon-256x256.png?rev=2986432)
 * [WebberZone Top 10 — Popular Posts](https://wordpress.org/plugins/top-10/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/top-10/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/top-10/)
 * [Active Topics](https://wordpress.org/support/plugin/top-10/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/top-10/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/top-10/reviews/)

## Tags

 * [count](https://wordpress.org/support/topic-tag/count/)
 * [update](https://wordpress.org/support/topic-tag/update/)
 * [views](https://wordpress.org/support/topic-tag/views/)

 * 9 replies
 * 4 participants
 * Last reply from: [Ajay](https://wordpress.org/support/users/ajay/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/total-views-doesnt-updates/#post-10608493)
 * Status: not resolved