title: ACF Custom user field in search query
body: <p>I have created some field in user section, Now i want to search user by custom field. Like Phone of City Name. While search by first name and last name is working fine by could not get user by phone or city name.
  My custom user field is "phone" and "pin_code"</p>
  
  <pre><code>&lt;?php if( $_GET['s'] ) {
  
                  $search_term = sanitize_text_field( stripslashes( $_GET['s']));
  
  
                  // WP_User_Query arguments
                  $args = array (
                      'order'      =&gt; 'ASC',
                      'orderby'    =&gt; 'display_name',
                      'search'     =&gt; '*' . esc_attr( $search_term ) . '*',
                      'meta_query' =&gt; array(
                          'relation' =&gt; 'OR',
                          array(
                              'key'     =&gt; 'first_name',
                              'value'   =&gt; $search_term,
                              'compare' =&gt; 'LIKE'
                          ),
                          array(
                              'key'     =&gt; 'last_name',
                              'value'   =&gt; $search_term,
                              'compare' =&gt; 'LIKE'
                          ),
                          array(
                              'key'     =&gt; $_phone,
                              'value'   =&gt; $search_term,
                              'compare' =&gt; 'LIKE'
                          )
                      )
                  );
  
                  // Create the WP_User_Query object
                  $wp_user_query = new WP_User_Query( $args );
  
                  // Get the results
                  $authors = $wp_user_query-&gt;get_results();
  
                  // Check for results
                  if ( ! empty( $authors ) ) {
                      // loop through each author
                      foreach ( $authors as $author ) { 
                          // get all the user's data
                          $author_info = $author-&gt;ID; ?&gt;
                          &lt;div &gt;&lt;?php 
                          $phone = get_field('phone', 'user_'. $author_info );
                          $adderess = get_field('adderess', 'user_'. $author_info );
                          $adderess_2 = get_field('adderess_2', 'user_'. $author_info );
                          $zip = get_field('pin_code', 'user_'. $author_info );
                          $bio = get_field('coach_bio', 'user_'. $author_info );
                          $category = get_field('category', 'user_'. $author_info );
                          if( get_field('avatar', 'user_'. $author_info ) ) {
                          $avatar = get_field('avatar', 'user_'. $author_info );
                          }
                          else {
                              $avatar = 'http://0.gravatar.com/avatar/0c12cfa22b6d6f53d7701858ecc3b67e?s=96&amp;d=mm&amp;r=g';
                          }
                  ?&gt;
              &lt;/div&gt;
                  &lt;div class="member"&gt;
                  &lt;h2 class="member-name"&gt;&lt;a href="&lt;?php echo get_author_posts_url($author_info); ?&gt;"&gt;&lt;?php echo $author-&gt;display_name; ?&gt;&lt;/a&gt;&lt;/h2&gt;
                  &lt;div class="user"&gt;
  
                          &lt;?php $user = get_userdata( $author_info );
                              $user_roles = $user-&gt;roles;
                              if ( in_array( 'pms_subscription_plan_11', $user_roles, true ) ) {
                                  echo '&lt;img src="http://lifecoachnearme.co.uk/wp-content/uploads/2020/01/policy-badge.png" class="badget"&gt;';
                              }
                          ?&gt;
                      &lt;div class="article_left"&gt;
                          &lt;a href="&lt;?php echo get_author_posts_url($author_info); ?&gt;"&gt;&lt;?php echo '&lt;img src="'.$avatar.'" &gt;'; ?&gt;&lt;/a&gt;
                      &lt;/div&gt;
                      &lt;div class="article_right"&gt;
                          &lt;div class="profile-display-address"&gt;
                              &lt;div class="col-6"&gt;&lt;?php echo $adderess; ?&gt;&lt;/div&gt;
                              &lt;div class="col-6"&gt;&lt;?php echo $adderess_2; ?&gt;&lt;/div&gt;
                              &lt;div class="col-6"&gt;&lt;?php echo $zip; ?&gt;&lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="contact-form contact-links"&gt;&lt;a href="#"&gt;Contact me&lt;/a&gt;&lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class="button-profile"&gt;&lt;a class="button whitebg" href="&lt;?php echo get_author_posts_url($author_info); ?&gt;"&gt;View profile&lt;/a&gt;&lt;/div&gt;
                  &lt;/div&gt;
  
                  &lt;?php   }
                      echo '&lt;/ul&gt;';
                  } 
  
                  else {
                      echo 'No authors found';
                  }
  
  }
                       ?&gt;
  </code></pre>
  
  <p>I really done know how to pass custom user field in query arg.</p>
  
  <p>Also i want to give a dropdown next to the search input that user can select there area of expertise. Like they are teacher or student. So result should be relative </p>