Perhaps you can add a hidden field to the HTML which will pass the 'relation' => 'OR'
.
<input type="hidden" name="tax_query[relation]" value="OR">
<select name="tax_query[][country]" multiple>
<option value="united-kingdom">United Kingdom</option>
<option value="ireland">Ireland</option>
</select>
<select name="tax_query[][type]" multiple>
<option value="director">Director</option>
<option value="partner">Partner</option>
</select>
Which translates to:
tax_query[relation]=OR&tax_query[][country]=united-kingdom&tax_query[][type]=director
Array
(
[tax_query] => Array
(
[relation] => OR
[0] => Array
(
[country] => united-kingdom
)
[1] => Array
(
[type] => director
)
)
)
Seems like your network
page is custom and would find that with $_REQUEST
.
Just referencing how to handle multiple taxonomy queries and modeling based on http_build_query()
to add 'relation' => 'OR'
.
$args = http_build_query( array (
'post_type' => 'post',
'tax_query' => array (
'relation' => 'OR',
array (
'taxonomy' => 'movie_genre',
'field' => 'slug',
'terms' => array ( 'action', 'comedy' ),
),
array (
'taxonomy' => 'actor',
'field' => 'term_id',
'terms' => array ( 103, 115, 206 ),
'operator' => 'NOT IN',
),
),
) );
echo "<pre>";
echo PHP_EOL . $args . PHP_EOL;
print_r( wp_parse_args( $args ) );
Which ends up looking like:
post_type=post&tax_query%5Brelation%5D=AND&tax_query%5B0%5D%5Btaxonomy%5D=movie_genre&tax_query%5B0%5D%5Bfield%5D=slug&tax_query%5B0%5D%5Bterms%5D%5B0%5D=action&tax_query%5B0%5D%5Bterms%5D%5B1%5D=comedy&tax_query%5B1%5D%5Btaxonomy%5D=actor&tax_query%5B1%5D%5Bfield%5D=term_id&tax_query%5B1%5D%5Bterms%5D%5B0%5D=103&tax_query%5B1%5D%5Bterms%5D%5B1%5D=115&tax_query%5B1%5D%5Bterms%5D%5B2%5D=206&tax_query%5B1%5D%5Boperator%5D=NOT+IN
And can be parsed by wp_parse_args()
.