tax_query - markhowellsmead/helpers GitHub Wiki

See also meta query.

Make sure that the array is two levels deep.

Get posts by custom taxonomy term


$sht_teammemberstory_tax = 6; // Term ID
…
'tax_query' => [
	[
		'taxonomy' => 'sht_story_type',
		'field' => 'term_id',
		'terms' => $sht_teammemberstory_tax,
		'operator' => '=', // optional if 'equals'
	]
],