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>'; } ?>
- The topic ‘echo thumb in user array’ is closed to new replies.