我试图在“tax_query”中回显 $zipcode_term,但它不起作用......
wp_reset_query();
$zipcode_term = get_the_term_list( get_the_ID(), 'zipcode' );
$args = array(
'tax_query' => array(
array(
'taxonomy' => 'zipcode',
'field' => 'slug',
'terms' => '.$zipcode_term.'
)
)
);
$query = new WP_Query( $args );
我已经回显了 $zipcode_term 并且它正确显示了它,所以我知道该部分正在工作,我怎样才能正确地在数组内部表达它?