I don’t have much time so may not have the full gist of you post, but since you direct messaged…
If CODE is the page title, then it isn’t meta, and won’t find anything. If you can, make it a custom field. You could write a simple function on post_save to copy the title to a custom field, so it’s never forgotten.
Otherwise - if you have the post_title - why do you need meta? Isn’t the title unique? in which case you could write a custom query using:
get_page_by_title($page_title_var, OBJECT, 'post');
If you have many posts of the same title, try using the bricks query editor and something like:
$query = new WP_Query( array(
'post_type' => 'post',
'title' => {url_parameter:code},
'meta_query' => array(
array(
'key' => date_field_name,
'value' => {url_parameter:date},
'compare' => '=',
),
),
) );
So you can search direct on title.
Otherwise, I’d just create the whole thing as a custom query: Adding any Custom WP_Query loop to Bricks' Query Loop - BricksLabs
On a final note- it’s always easier to deal with dates as numeric (format Ymd) - so if you can do that (it’s how ACF stores dates anyway) it’ll make comparisons, and using it in searches easier.
All very much in haste… hope it helps.