Title: Query by post view count
Last modified: October 17, 2018

---

# Query by post view count

 *  [raphaelfreire](https://wordpress.org/support/users/raphaelfreire/)
 * (@raphaelfreire)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/query-by-post-view-count/)
 * Hello everybody,
 * Could anyone please help me if it’s possible to make a wp_query using the view
   count as a parameter to order posts?
 * I’ve tried this, but it didn’t work:
    <?php $args = array( ‘post_type’ => ‘noticias’,‘
   posts_per_page’ => ‘6’, ‘meta_key’ => ‘a3_pvc_total_views’, ‘orderby’ => ‘meta_value_num’,‘
   order’ => ‘DESC’ ); $query = new WP_Query( $args ); if( $query->have_posts() ):
   while ( $query->have_posts() ) : $query->the_post(); the_title(); endwhile; endif;
   wp_reset_query(); ?>
 * Thank you, best regards

The topic ‘Query by post view count’ is closed to new replies.

 * ![](https://ps.w.org/page-views-count/assets/icon.svg?rev=986301)
 * [Page View Count](https://wordpress.org/plugins/page-views-count/)
 * [Support Threads](https://wordpress.org/support/plugin/page-views-count/)
 * [Active Topics](https://wordpress.org/support/plugin/page-views-count/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/page-views-count/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/page-views-count/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [raphaelfreire](https://wordpress.org/support/users/raphaelfreire/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/query-by-post-view-count/)
 * Status: not resolved