Hey @xRae,
The compare LIKE is correct to address your issue but you need to serialize the data so that it will get the exact value. I believe your query is like this one:
$query = new WP_Query(array(
'post_type' => 'event',
'posts_per_page' => 12,
'meta_query' => array(
array(
'key' => 'locale',
'compare' => 'LIKE',
'value' => get_the_ID()
)
)
));
But the correct query should be like this one, the value is stored inside ""
.
$query = new WP_Query(array(
'post_type' => 'event',
'posts_per_page' => 12,
'meta_query' => array(
array(
'key' => 'locale',
'compare' => 'LIKE',
'value' => '"' . get_the_ID() . '"'
)
)
));
From that code, you will have now an idea and create your own query string.
Hope that helps.