Title: Query loop using Top Ten Data
Last modified: August 31, 2016

---

# Query loop using Top Ten Data

 *  Resolved [nate_hellaclips](https://wordpress.org/support/users/nate_hellaclips/)
 * (@nate_hellaclips)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/query-loop-using-top-ten-data/)
 * Hey AD
 * Really loving the plugin. I’m trying to set up a couple pages that would display
   my posts by view count, one “daily”, “weekly” and the other of all time. Id like
   to do this by using the data your plugin calculates in the arguments for my loop
   query.
 * So far, I am using this:
 *     ```
       $args = array(
                   'posts_per_page' => 15,
                   'paged' => $paged,
                   'meta_key' => 'post_views',
                   'orderby' => 'meta_value',
                   'order' => 'DESC'
               );
               $the_query = New Wp_query();
               $the_query->query($args);
               ?>
       ```
   
 * But this is pulling posts starting from 2011 when I was using a different view
   count plugin – Am I using the wrong meta_key fro your plugin? Is there a meta
   key I could use in this manner daily posts as well as total post views?
 * Thanks for the awesome plugin!
 * [https://wordpress.org/plugins/top-10/](https://wordpress.org/plugins/top-10/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [WebberZone](https://wordpress.org/support/users/webberzone/)
 * (@webberzone)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/query-loop-using-top-ten-data/#post-6948762)
 * The plugin doesn’t save data in a meta key but actually in a separate table.
 * Please see this example: [https://gist.github.com/ajaydsouza/c8defd4b46e53240e376](https://gist.github.com/ajaydsouza/c8defd4b46e53240e376)

Viewing 1 replies (of 1 total)

The topic ‘Query loop using Top Ten Data’ is closed to new replies.

 * ![](https://ps.w.org/top-10/assets/icon-256x256.png?rev=2986432)
 * [WebberZone Top 10 — Popular Posts](https://wordpress.org/plugins/top-10/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/top-10/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/top-10/)
 * [Active Topics](https://wordpress.org/support/plugin/top-10/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/top-10/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/top-10/reviews/)

## Tags

 * [loop](https://wordpress.org/support/topic-tag/loop/)
 * [popular](https://wordpress.org/support/topic-tag/popular/)
 * [post](https://wordpress.org/support/topic-tag/post/)
 * [query](https://wordpress.org/support/topic-tag/query/)
 * [top](https://wordpress.org/support/topic-tag/top/)

 * 1 reply
 * 2 participants
 * Last reply from: [WebberZone](https://wordpress.org/support/users/webberzone/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/query-loop-using-top-ten-data/#post-6948762)
 * Status: resolved