• Resolved Marc Serra

    (@elseudomini)


    Hi to all!

    I’ve got this query:

    $args = array('category_name' => 'test','posts_per_page' => -1,'relation' => 'AND',
           'meta_query'    => array('relation'      => 'AND',
                   array(
                           'key'       => 'tipus',
                           'value'     => 'music',
                           'compare'   => 'LIKE'
                   ), ...
           )
    );

    Ok, work’s!

    But if I change 'music'for array('music') and 'LIKE' for 'IN'

    $args = array('category_name' => 'test','posts_per_page' => -1,'relation' => 'AND',
           'meta_query'    => array('relation'      => 'AND',
                   array(
                           'key'       => 'tipus',
                           'value'     => array('music'),
                           'compare'   => 'IN'
                   ), ...
           )
    );

    Doesn’t work! :_(

    What I’m missing?

    Thank’s

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘meta_query with array in value not working’ is closed to new replies.