也许有人会这样想:
$artists = get_the_term_list( $post->taxonomies, \'artist\' );
unset($artists[$key]); // don\'t know the context, but get the term, and remove it from the array
$args=array(
\'tax_query\' => array(
array(
\'taxonomy\' => \'artist\',
\'field\' => \'id\',
\'terms\' => $artists
)
),
\'post_type\' => \'sculptures\',
\'post_status\' => \'publish\',
\'posts_per_page\' => -1,
\'caller_get_posts\'=> 1
);
$publishedQuery = new WP_Query($args);
while ($publishedQuery ->have_posts()) : $publishedQuery ->the_post();
...
endwhile; wp_reset_query();
只需调整$artists即可满足您的需求。