Hiya:
Trying to make some modifications to get the view counts (and sorting) to work with a cache…
My question: How (and when) is [post_views_count_7_day_total] calculated? I have a post_count plugin properly updating the “post_views_count” field… i’m just not sure how the total is created.
Thanks.
We have here a tip how to make the views to work with cache: https://forum.tagdiv.com/wp-postviews-post-view-counter-alternative-for-w3-total-cache/
The view counter(7 day) keep the count on each day and make a total for 7 days.
Thanks, I have already read that article… and it works great, but it counts the views in a different field, so that the “7-day” sorting doesn’t work.
I need to have that plugin count in the post_views_count field (which I have done). I just need to know how the “post_views_count_7_day_total” field is calculated… so that I can make sure that gets updated as well.
Please advise.
hi hedtec
this is how the 7 day post count work:
there is an array with 7 positions, one for each day of the week.
each day only one position is updated.
ex: today only position 1 is updated, tomorrow only position 2 is updated.
when the week stats again -> today will become 0 and again only this position is
updated.
Thanks for you message.
Radu A.
it would be better the function, not to count per week basis, but’s dynamic and measure only per day.
The proper isn’t to counting the views from Monday to Sunday and give the corresponding results, but to count the last 7 days from today. so it shows the actual most views articles last 7 days
-
This reply was modified 12 years by
saggel.