I’m not entirely sure why the get_posts() function works instead of creating a new instance of WP_QUERY. From what I understand about how WordPress queries work, get_posts() is actually creating it’s own instance of WP_QUERY anyhow.
Either way, here is the solution that I’m using currently.
<?php
//GET THE PHOTOGRAPHERS
$args = array(
'post_type' => 'jdp_contributors',
'numberposts' => -1,
'tax_query' => array(
array(
'taxonomy' => 'jdp_contributor_types',
'field' => 'id',
'terms' => $terms
),
)
);
$photographers = get_posts($args);
//LOOP THRU THE PHOTOGRAPHERS
foreach( $photographers as $post ) {
$form_fields['jdp_photographer']['html'] .= '<option value="'.$post->ID.'" '.selected($post->ID, $current_photog, false).'>'.$post->post_title.'</option>';
}
?>