• Hi All

    $post_args=array(‘post_type’ => ‘post’,
    ‘order’ => ‘DESC’,
    ‘meta_query’ => array(
    ‘relation’ => ‘OR’,
    array(
    ‘key’ => ‘client_segment’,
    ‘value’ =>$firm_name ,
    ‘compare’ => ‘IN’,
    ),
    array(
    ‘key’ => ‘perspective_date’,
    ‘value’ => array($start_date, $end_date),
    ‘compare’ => ‘BETWEEN’
    )
    ),
    ‘tax_query’ => array(
    ‘relation’ => ‘OR’,
    array(
    ‘taxonomy’ => ‘category’,
    ‘field’ => ‘id’,
    ‘terms’ => $read_type,
    ‘operator’ => ‘IN’)

    ),

    );
    $posts = new WP_Query($post_args);

    This is my code how can I give OR relation between meta_query and tax_query.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘OR relation between meta_query and tax_query’ is closed to new replies.