7 days sorting

Posted in: Newspaper
Post count: 35

Hi !

I have read all the post about that. So : count views is active but masked with css, 7days sorting is active also. But in the widget it’s most read posts of all time and not the 7 last days… (the widget is also configured with 7 days sorting).

If it’s not possible, could we reset all the counters ? ๐Ÿ™‚

Thank you very much,
Antoine ๐Ÿ™‚

  • This topic was modified 11 years by EliptiK.
Post count: 7909

Hi,

Please note that it pulls from ALL the posts the most accessed in the last 7 days NOT the posts that are published in the last 7 days. Also please test this without using caches as the last days 7 post count works based on post views so if you use cache this might not work properly.
Also test it by editing a post and take a look at custom fields: http://screencast.com/t/mSiJvu61tGj then refresh the post a few times and check if it increments. If those values changes when the post is viewed then 7 day sort should work properly.

Thanks!

Post count: 35

Ok, so, it works if I change manually the number of post views.
Is there a way to reset all views of all posts ? Like that it will start from scratch ๐Ÿ™‚

Thanks!

Post count: 7909

Hi,

I have provided above a solution to check if 7 days post count works properly, so when you refresh a post for few times to check if views are increment there.
Yes, you can only manually to reset post views, but please note that resetting post views will not affect 7 days post count, as the 7 days article views are automatically reset after 7 days, it start again from day 1 reset and count, day 2 reset and count.

Thanks!

Post count: 35

Ok thanks !

Apparently I have a problem with 4 articles which are visited a lot by bots. That’s why they are always on top. When I put the count to 0, the sorting works perfectly, good job ๐Ÿ™‚

My question now is, how can I exclude these articles of the sorting ?

Thanks for your help!
Antoine

Post count: 6600

Hi,

You can add the 'post__not_in' wp query parameter to the 7 days post sorting here: http://screencast.com/t/rBIL9MMEq

$exclude_ids = array( 150, 197, 170 );
$wp_query_args['post__not_in'] = $exclude_ids;

Replace the post ids with yours.

Thanks

Post count: 35

Top ! Awesome ! ๐Ÿ™‚

Post count: 8

Can anyone tell me why support is ignoring me with similar issue?!
Link to the topic https://forum.tagdiv.com/topic/top-posts-7-days-sorting-not-working/

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.