I want to show a custom Avatar image field on the author page. The following code is working for me, but shows as can be guesses the field of the current user. It should show the avatar field of the specific author.
the_field('avatar', 'user_'. $user_ID);
?>
<img src="<?php the_field('avatar', 'user_'. $user_ID); ?>" width="50" height="50"> ```
2
Answers
Need to grab the Author ID… You can use
get_queried_object_id()
for this on theauthor.php
template like below:simply use get_users()