How to show top selling items on EDD

By In Others — October 12, 2016

Use this query for showing top selling items.   <?php $popular_items = new WP_Query (array( ‘post_type’ => ‘download’, ‘orderby’ => ‘meta_value_num’, ‘meta_query’ => array( ‘relation’ => ‘AND’, array( ‘key’ => ‘_edd_download_sales’, ‘compare’ => ‘>’, ‘value’ => 0, ‘order’ => ‘DESC’, ), ), ‘posts_per_page’ => 3 )); ?>