Support

Account

Home Forums General Issues show array of relationship field values in USER query Reply To: show array of relationship field values in USER query

  • Hi,

    Hm okay.. but if $user is a regular wp user object in WP then $values should not work. To retrieve a user meta field in ACF you need to do
    $values = get_field('user_faecher', 'user_'.$user->ID);

    Also in your code, this part does absolutely nothing:

    
      $args = array (
                                            'meta_query'     => array(
                                                    array(
                                                           
                                                    ),
                                            ),
                                    );
    

    You’re basically passing no arguments into wp_user_query. Which is fine if you’re good with the default arguments but if so you should remove that code along with the $args inside WP_User_Query.