• I’m ripping my hair out here. The code below works when I am querying two taxonomies but breaks when I add a third. Any help would be appreciated. Thanks.

    $my_query = new WP_Query( array(
    	'orderby' => 'rand',
    	'posts_per_page' => 30,
    	'post_type' => 'song',
    	'tax_query' => array(
              'relation' => 'OR',
    	   array(
    	     'taxonomy' => 'band-name',
    	     'terms' => $featband22,
    	     'field' => 'term_id'
    	   ),
    	   array(
    	     'taxonomy' => 'music-genre',
    	     'terms' => $featgenre22,
    	     'field' => 'term_id'
    	   ),
    	   array(
    	     'taxonomy' => 'record-label',
    	     'terms' => $featlabel22,
    	     'field' => 'term_id'
    	   ),
    	)
    ));
    if( $my_query->have_posts() ) {
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Query Multiple Taxonimies’ is closed to new replies.