Would you believe it, as soon as I posted this I remembered I asked a question about a query last year. I had a look over it and I’ve adapted my new query like so:
$category_slug = filter_input(
INPUT_GET,
'eventtype',
FILTER_SANITIZE_STRING
);
$cat_query = [];
if( $event_type ){
$cat_query = [
[
'taxonomy' => 'eventtype',
'field' => 'slug',
'terms' => $event_type
]
];
}
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
$args = array(
'post_type' => array('whatson'),
'post_status' => 'publish',
'tax_query' => $cat_query,
'meta_query' => array(
array(
'key' => 'sc_related_venues_title',
'value' => $location,
'compare' => 'LIKE' ,
'field' => 'title',
),
),
'orderby' => 'date',
'order' => 'desc',
'posts_per_page' => '10',
'paged' => $paged,
);
$wp_query = new WP_Query( $args);