Ticket for: Combo Blocks
0
Craig Durling
I have searched how to add a filter by post most views or by date, but I couldn't find how to do this. I have recently installed the plugin Post Views Counter, but I am not sure how I can implement the post view counts as a filter. How can I add a filter for post views and also for date?
2 Subscribers


Submit Answer
1 Answers
Best Answer
0

Welcome to our forum.
This is only possible of "Post Views Counter" plugin saved post view count under post meta, so you can run post query based on meta query. Meta query feature only available in pro version, but you can also do this by adding custom filter hook for query arguments, although i can help you. please make sure is that post view count saved under post meta or not, please consult with that plugin developer.
Regards
Thank you for providing the document. I was able to get the post view count to sort by views, however it seems like it is only showing the post that have views. Is there a way to show all the posts in my grid, even the ones with zero views?
Also after reading the document you provided I now know how to use the meta value, so I have also added a meta value post grid to sort by Yetanotherstarsrating, using yasr_overall_rating. It's prob not a problem with Post Grid, but using this it is only showing 8 pages of posts, but it should be showing 11 pages of posts. https://callofdutyrepo.com/waw-maps-by-star-rating/
Anyways thanks for the help it's much appreciated.