Title: echo thumb in user array
Last modified: August 30, 2016

---

# echo thumb in user array

 *  [Ismael Latorre](https://wordpress.org/support/users/miguelripoll/)
 * (@miguelripoll)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/echo-thumb-in-user-array/)
 * Hi,
 * I am doing a user query whereby I get some custom fields from a previously chosen
   list of users. The code below works just fine. I need to know how to include 
   within this query the thumb pic for each user retrieved. Any ideas?
 *     ```
       <?php
       $values = get_field( 'execs','options' ); // Custom ACF user field retrieves a list of users
       if ( $values ) {
         $execs = array();
         foreach ( $values as $value ) {
           $link = get_author_posts_url( $value['ID'] ); //get the url
           $nicename = $value['display_name'];
           $userdesc = $value['user_description'];
           $position = get_field( 'academic_position', 'user_' . $value['ID'] ); // custom ACF text
           $affiliation = get_field( 'affiliations', 'user_' . $value['ID'] ); // custom ACF text
           $execs[] = sprintf( '<li><a href="%s">%s</a><p>%s</p><p>%s</p><p>%s</p></li>', $link,  $nicename, $userdesc, $position, $affiliation); // listing
         }
   
         echo '<h4>Executive Committee</h4>';
         echo '<ul>';
         echo implode( $execs );
         echo '</ul>';
   
       } ?>
       ```
   
 * [https://wordpress.org/plugins/user-photo/](https://wordpress.org/plugins/user-photo/)

The topic ‘echo thumb in user array’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/user-photo.svg)
 * [User Photo](https://wordpress.org/plugins/user-photo/)
 * [Support Threads](https://wordpress.org/support/plugin/user-photo/)
 * [Active Topics](https://wordpress.org/support/plugin/user-photo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-photo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-photo/reviews/)

## Tags

 * [user query](https://wordpress.org/support/topic-tag/user-query/)

 * 0 replies
 * 1 participant
 * Last reply from: [Ismael Latorre](https://wordpress.org/support/users/miguelripoll/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/echo-thumb-in-user-array/)
 * Status: not resolved