Home › Forums › Front-end Issues › Display all users/authors in template › Reply To: Display all users/authors in template
Thanks for the info! I think I may still be doing something wrong, but here is what I have so far
<?php
$field_name = "author_header";
$post_id = "user_{$user_id}";
$publisher_photo = get_field($field_name, $post_id);
$image_src = wp_get_attachment_image_src($publisher_photo);
echo '<img class="grayscale" src="'. $image_src[0] .'" />';
?>
Any advise? thanks!
Here is the working solution
<?php
$user_id = $user->ID;
$publisher_photo = get_the_author_meta('author_header', $user_id);
$image_src = wp_get_attachment_image_src($publisher_photo);
echo '<img src="'. $image_src[0] .'" />';
?>
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.