Support

Account

Home Forums General Issues WP Archive page with filter (key=array, value=array) Reply To: WP Archive page with filter (key=array, value=array)

  • 
    $meta_query = array('relation' => 'AND' /* and other base meta query settings */);
    $sub_query = array('relation' => 'OR');
    foreach ($colors as $color) {
      $sub_query[] = array(
        'key' => 'project_color',
        'value' => '"'.$color.'"',
        'compare' => 'LIKE'
      }
    }
    $meta_query[] = $sub_query;