Skip to main content
deleted 26 characters in body; edited body
Source Link
jdm2112
  • 3.7k
  • 1
  • 16
  • 23

Have you tried passing an array of values to the value argument?

$your_array$your_terms = array( 'foo', 'bar', 'baz' );

foreach ($keywords as $value) {
    $args['meta_query'] = array(
        'relation' => 'OR',
        array(
            'key' => 'customfields',
            'value' => $your_array$your_terms,
            'compare' => 'REGEXP'  
        )
);

$this_query = new WP_Query( $args );
}

Have you tried passing an array of values to the value argument?

$your_array = array( 'foo', 'bar', 'baz' );

foreach ($keywords as $value) {
    $args['meta_query'] = array(
        'relation' => 'OR',
        array(
            'key' => 'customfields',
            'value' => $your_array,
            'compare' => 'REGEXP'  
        )
    );
}

Have you tried passing an array of values to the value argument?

$your_terms = array( 'foo', 'bar', 'baz' );

$args['meta_query'] = array(
    'relation' => 'OR',
    array(
        'key' => 'customfields',
        'value' => $your_terms,
        'compare' => 'REGEXP'  
    )
);

$this_query = new WP_Query( $args );
Post Undeleted by jdm2112
Post Deleted by jdm2112
Source Link
jdm2112
  • 3.7k
  • 1
  • 16
  • 23

Have you tried passing an array of values to the value argument?

$your_array = array( 'foo', 'bar', 'baz' );

foreach ($keywords as $value) {
    $args['meta_query'] = array(
        'relation' => 'OR',
        array(
            'key' => 'customfields',
            'value' => $your_array,
            'compare' => 'REGEXP'  
        )
    );
}