Closed holzhannes closed 5 years ago
Hi @holzhannes,
Option or snipped
There's no built-in option for this (yet, and there might or not be one in the future) but there's a code snippet another user posted at the support forums that does exactly this:
How To: Sort a custom query by views (All time, monthly, weekly, or daily)
Please pay special attention to some of the comments posted there.
I would be great to have the possibility to save the value of visits to a meta value of each post, page or custom post type. It could be done with a cron job every day. Therefore this value could be used for sorting content with custom Queries or with Plugins like Display Posts Shortcode.