I'm trying to query wordpress with multiple values but it looks like it can't take no more than 4 keywords
I'm currently using a loop and I already tried to switch to a IN operator but I need the query to work with wildcards and while REGEXP does the job, IN does not
foreach ($keywords as $value) {
$args['meta_query'] = array(
'relation' => 'OR',
array(
'key' => 'customfields',
'value' => $value,
'compare' => 'REGEXP'
)
);
}
In this case $keywords
is an array of words that I need to query to a custom field. It works with a few keywords, but it breaks with 5 or more.