Hi,
I'm afraid we couldn't make it work simply by modifying query arguments. Since the values are stored in a serialized array in the database, the sorting simply can't work.
I suggest a hack for this: when saving the event times (array), save the first value into another custom field and use that new field for sorting.
Here is a sample code, you should adapt it to your situation:
add_action( 'rwmb_{META_BOX_ID}_after_save_post', 'prefix_add_event_start' );
function prefix_add_event_start( $post_id ) {
$times = get_post_meta( $post_id, 'event_start', true );
if ( !empty( $times ) && is_array( $times ) ) {
$start = reset( $times );
update_post_meta( $post_id, 'event_start_first', $start );
}
}
And then modify the query arguments by:
'meta_key' => 'event_start_first',
'orderby' => 'meta_value',
'order' => 'ASC',