What are you expecting here? "$tax"
is going to to be 'people' =>
, which is going to overwrite 'harrison-ford'
to the value of $tax_term->slug
.
'people' => 'harrison-ford',
"$tax" => $tax_term->slug,
Furthermore, I don't know of any custom argument called people
, I'm pretty sure that you want tax_query
:
'tax_query' => array(
'taxonomy' => 'people',
'terms' => array('harrison-ford', $tax_term->slug)
)
Which will give you the results of all people matching harrison-ford
and the value of $tax_term->slug
within the taxonomy of people