Home Forums General Issues wp_query and meta_query for repeater field values Reply To: wp_query and meta_query for repeater field values

  • Hi

    The method is already working ?

    i tried.. and it dont work :/

    What i made :

    i got a custom field form, who search in ajax with get_users and with complexe request on many user’s customs fields

    all work fine, even filter taxonomy assigned to user like custom field

    but this dont work for my repeater field..

    the repeater key is : liste_des_langues & the item key : langue

    if add this :

    function wpza_replace_repeater_field( $where ) {
        $where = str_replace( "meta_key = 'liste_des_langues_$", "meta_key LIKE 'liste_des_langues_%", $where );
        return $where;
    add_filter( 'posts_where', 'wpza_replace_repeater_field' );

    and this is my request args for this field :

    if($langues && $langues != 'all'){
            $temp = array(
                'key' =>  'liste_des_langues_$_langue',
                'value' =>  $langues,
                'compare' => 'LIKE',
            array_push($request['meta_query'] , $temp);

    this is the basic request :

    $request = array(
            'role__in' => array( 'consultant' ),
            'meta_query'      => array(),
            'tax_query'      => array(),
        if(count($_GET) > 1){
            $request['meta_query']['relation'] = 'AND';

    and i dont understand where is my mistake, someone can help please ?