jasonglisson
8/28/2014 - 1:46 AM

Wordpress - Query by Taxonomy

Wordpress - Query by Taxonomy

function cc_community_partner_query() {
    
    $args = array(
        'post_type' => 'partner',
        'posts_per_page' => 99,
        'tax_query' => array(
            array(
              'taxonomy' => 'partner-levels',
              'field' => 'slug',
              'terms' => 'community-partners',
              'operator' => 'NOT IN'
            )
        )
    );

    $community_partners = new WP_Query( $args );

    return $community_partners;
}