I luckily found a cached version of that support thread. Looks like the support forum’s syntax highlighter library is broken or not loading. Anyway here is the snippet that @kokers provided there:
function my_posts_where( $where ) {
global $wpdb;
$where = str_replace(
"meta_key = 'locations_%",
"meta_key LIKE 'locations_%",
$wpdb->remove_placeholder_escape($where)
);
return $where;
}
add_filter('posts_where', 'my_posts_where');
@wdj-pascal that link to the workaround by @kokers no longer contains the snippet… Must be a problem on the WordPress support forum side of things.
Could someone post the snippet here too? I’m having this problem and I can’t find anywhere else that includes that code snippet that solved the issue.