Using more than one meta_key in pre_posts_query
Use WP_Query to select any post based on meta key and value. You can also sort posts Ex: $args = array( ‘post_type’ => ‘events’, ‘orderby’ => ‘meta_value_num’, //probably you will need this because the value is date ‘meta_key’ => ‘event_date’, ‘meta_query’ => array( ‘relation’ => ‘AND’, array( ‘key’ => ‘event_status’, ‘value’ => $retrieved_status, ‘compare’ => … Read more