Title: Custom query?
Last modified: September 15, 2016

---

# Custom query?

 *  Resolved [jarvsodesign](https://wordpress.org/support/users/jarvsodesign/)
 * (@jarvsodesign)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/custom-query/)
 * Hi. I have som custom fields on my posts that i would like to have in the query.
   Is there a way to enter some meta_query data into the $args array? Such as
 *     ```
       $args = array( 
           'limit' => 4,
           'range' => 'monthly',
           'meta_query' => array(
                       array(
                           'key'     => 'active_customer',
                           'value'   => '0',
                       ),
                       array(
                           'key'     => '_thumbnail_id',
                           'compare'   => 'EXISTS',
                       ),
   
                   ),
       );
       ```
   
 * Regards
    Anders
    -  This topic was modified 9 years, 8 months ago by [jarvsodesign](https://wordpress.org/support/users/jarvsodesign/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/custom-query/#post-8185740)
 * Hi Anders!
 * WPP builds its own custom database queries based on its predefined set of options
   and how the user configured them. New options (as the ones from your example)
   will be ignored since they’re not part of WPP’s parameter set.
 * There’s [another way to query popular posts from WPP using the WP_Query class](https://wordpress.org/support/topic/how-to-sort-a-custom-query-by-views-all-time-monthly-weekly-or-daily/).
   You’ll want to check it out.
 *  Thread Starter [jarvsodesign](https://wordpress.org/support/users/jarvsodesign/)
 * (@jarvsodesign)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/custom-query/#post-8185859)
 * Hi Hector. Thanks a million for that link. It worked perfectly!
 * Cheers! And thanks for an awsome plugin!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom query?’ is closed to new replies.

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

 * 2 replies
 * 2 participants
 * Last reply from: [jarvsodesign](https://wordpress.org/support/users/jarvsodesign/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/custom-query/#post-8185859)
 * Status: resolved