Home › Forums › General Issues › User Field Type Issues › Reply To: User Field Type Issues
I’ve used a version of this code for a site I’m developing at the moment. It’s working exactly how I’d like appart from that I’d like to change the size of the avatar image from the standard 96px to 170px. Could someone advise how to edit the code below to achieve this – Thanks!
<?php $users = get_field('practitioners'); if ($users): ?> <?php foreach ($users as $user): ?> <?php setup_postdata($user); $userid = $user['ID']; $userfirst = $user['user_firstname']; $userlast = $user['user_lastname']; $useravatar = $user['user_avatar']; $userdescript = $user['user_description']; ?> <div class="authorWrap"> <?php echo $useravatar; ?> <?php echo $userfirst; ?> <?php echo $userlast; ?> - <?php echo $userdescript; ?> </div> <?php endforeach; ?> <?php wp_reset_postdata(); ?> <?php endif; ?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
ACF wouldn’t be so widely used in WordPress if it didn’t have some pretty amazing capabilities. In this article, we look at a few of the features we’ll discuss during “7 things you didn’t know you could do with ACF” at #WPEDecode later this month. https://t.co/5lnsTxp81j pic.twitter.com/Yf0ThPG1QG— Advanced Custom Fields (@wp_acf) March 16, 2023
© 2023 Advanced Custom Fields.