Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get popular downloads for recent XX days. Easy Digital Downloads.
@thefrosty

This comment has been minimized.

Copy link
Owner Author

commented Jan 23, 2015

I'm going to follow up and say my use is a special use case. I've moved outside of downloads as my post type. I ended up figuring it out after a quick break. Since I've got multiple post types that use downloads for the front end I was using CPT-onomies to tie them together. This is the $args I had to update to:

$query_args = array(
            'post_type'         => 'plugin',
            'post_status'       => 'publish',
            'posts_per_page'    => 6,
        #   'post__in'          => $post__in,
            'suppress_filters'  => false,
            'tax_query'         => array(
                array(
                    'taxonomy'  => 'download', // EDD download post_type (CPT connection)
                    'field'     => 'id', // can be slug or id - a CPT-onomy term's ID is the same as its post ID
                    'terms'     => $post__in 
                )
            )
        );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.