Support

Account

Forum Replies Created

  • additional note: If you’re using meta_query array, your keys should not be prefixed with meta_. If you’re using $query->meta_key, $query->meta_value, etc. then these should still retain the prefix.

  • It didn’t work, at first.
    Then, I changed the $meta_query to $args (at the top). And it works! Thank you.

    $args = array(
      'relation' => 'OR',
      array(
        'key' => 'service1',
        'value' => $_GET['service']
      ),
      array(
        'key' => 'service2',
        'value' => $_GET['service']
      ),
      array(
        'key' => 'service3',
        'value' => $_GET['service']
      ),
      array(
        'key' => 'service4',
        'value' => $_GET['service']
      ),
    )
    $query->set('meta_query', $args);
Viewing 2 posts - 1 through 2 (of 2 total)