Support

Account

Home Forums General Issues Problem Query Select Multiple Field Reply To: Problem Query Select Multiple Field

  • You cannot to an “IN” query with an ACF select field. ACF saves this value as a serialized array (A string).

    
    $posts = get_posts(array(
        'posts_per_page'	=> 1000,
        'post_type'			=> $post_type,
    //    'paged' => $paged,
        'meta_query' => array(
            'relation' => 'OR',
            array(
                'key' => 'activite',
                'value' => 'value 1',
                'compare' => 'LIKE'
            ),',
            array(
                'key' => 'activite',
                'value' => 'value 2',
                'compare' => 'LIKE'
            ),
        )));