Title: Sorting posts by pageviews?
Last modified: August 20, 2016

---

# Sorting posts by pageviews?

 *  [clarklab](https://wordpress.org/support/users/clarklab/)
 * (@clarklab)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/sorting-posts-by-pageviews/)
 * I’ve been using this plugin for a few weeks now and everything is just about 
   perfect, but I’d really like the option to sort my posts by pageview in my templates.
   Would it be possible to extend this plugin with a custom orderby=pageviews I 
   could use with query_posts?
 * Either way, thanks for the great plugin.

Viewing 1 replies (of 1 total)

 *  Thread Starter [clarklab](https://wordpress.org/support/users/clarklab/)
 * (@clarklab)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/sorting-posts-by-pageviews/#post-2230475)
 * right now the only way I can think to do it is to save the pageview data as meta
   data on each post and then orderby the meta value. but that seems like jumping
   through a hoop, I’d rather not have to cache the number.

Viewing 1 replies (of 1 total)

The topic ‘Sorting posts by pageviews?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/post-n-page-views.svg)
 * [Post 'n Page Views](https://wordpress.org/plugins/post-n-page-views/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-n-page-views/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-n-page-views/)
 * [Active Topics](https://wordpress.org/support/plugin/post-n-page-views/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-n-page-views/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-n-page-views/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [clarklab](https://wordpress.org/support/users/clarklab/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/sorting-posts-by-pageviews/#post-2230475)
 * Status: not resolved