#52141
Bartosz
Keymaster

Post Views Counter is not storing views in post meta, so you can’t do it like this.
But if you build a query and set orderby to “post_views” it should work out of the box.

You can check here https://dfactory.co/docs/post-views-counter/developers-api/ how a simple get_posts() function can be used to do what you need.