Adding an array from a query string to a WP meta_query
This $_GET[‘variable’] is an array, as per your URL query string ?variable[]=value1&variable[]=value2, $_GET[‘variable’][0] and $_GET[‘variable’][1] should return those 2 key values Edit – after the discussion – making it dynamic $meta_query = array(); if ( ! empty( $_GET[“variable”] ) ) { if ( is_array( $_GET[“variable”] ) ) { $meta_query[‘relation’] = ‘OR’; foreach ( $_GET[“variable”] as … Read more