Does the “7 Days Post Sorting” work with caching plugins or not?

Posted in: Newspaper
Post count: 24

Info found in the documentation is kind of contradictory – it says there that “This sorting option will not work with cache plugins.” and on the same page there’s a screenshot stating that if this option is turned on that it will be a calculation of estimation of posts popularity, if used with caching plugin.

We are running WP Rocket caching plugin with this option turned on for 7 days now but no posts are showing at all. Is it possible that some theme JS that tracks posts views is not being executed? Is there a way we can confirm that post views are being tracked by the theme?

Post count: 27744

Hello,

Please enable this option: https://i.imgur.com/xmyQUIk.png, and the sorting option should work with the cache plugin.

Thank you!

Post count: 24

Hi,

thanks for help. Now post counter works, and has been active for almost 2 days now but still no posts are showing when “Popular (last 7 days) option is selected in the Sort order field. We tried clearing the cache and disabling the cache but to no luck.

Post count: 27744

Hello,

Do you have the post view element on the posts?

Thank you!

Post count: 24

Thanks, the “SHOW POST VIEWS” option was disabled, enabling it did the trick but I am curious, how does the description “Enable or disable the post views (on single post page)” correlate to making the sort option “Popular” work and display the posts while this sort option is used?

Post count: 27744

Hello,

The popular option is made to work with the post views.

Thank you!

Post count: 195

Check this topic – https://forum.tagdiv.com/topic/post-views-7-days-incorrect-count/

This posts shows how to create a widget that works perfectly.

Post count: 24

Hi petar777, thanks for the replay.

We followed the steps Anamaria outlined in this topic and have compared them with the steps described in the topic you linked

  • option in theme panel to show views on post
  • 24h/48h post views sorting
  • ajax view count
  • insert the element for single post views inside template for single post
  • hide with css showing views on frontend.

and oddly enough we did not have to do the “insert the element for single post views inside template for single post” step as the “7 Days Post Sorting” works without it.

Granted, we have not tested yet and compared the post views to see if it’s calculating the views correct as opposed to data collected via Jetpack and Google Analytics vs theme counter but it is noted that if caching plugins are used this will only be an estimation. Unfortunately, we do use WP Rocket on our website so I don’t expect this option to show 100% correct data.

  • This reply was modified 1 year by mm-2.
Post count: 195

What I did is to exclude that element from being cached and it works perfectly with caching for me. If you want to I can share you how it is done.

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