I found an older post showing what I was missing from my code, so it seems like I didn’t do a good enough search to begin with.
For anyone wondering I was missing 'compare' => 'LIKE' from the query, so the code would look like this:
$args_post = array('post_type' => 'release', 'orderby' => '_custom', 'order' => 'ASC', 'posts_per_page' => -1, 'meta_query' => array(
array(
'key' => 'classification',
'value' => 'Data',
'compare' => 'LIKE',
),
),
);
Everything’s working like a charm now!
UPDATE
While this solution works, please note @PieterGoosen’s comments to the question:
LIKEcomparisons are quite expensive to run. Also, serialized data is really not meant for searching and ordering operations. The issue here is withLIKEas well is, if you search fordot,mydot,dot,dotcomare also returnedWhat the
LIKEcomparator do is, it does not search for exact mathes like a comparator like maybeINwould do. It searches, for anything that is likely to match the term. If you where to search for a custom field value of saydot, or lets say as in your exampleData, the like comparator would search and return anything with those 4 letters in sequence ofdata, so it would returnData,data-mining,databaseandcrappy-dataif you have those 4 words in database. So this make theLIKEvery unreliable, which is why you should avoid serialized data