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; ?>
Thanks!
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.