Home › Forums › Front-end Issues › issues displaying an image with the_field() › Reply To: issues displaying an image with the_field()
I have this same problem, i think something is wrong with the value, because the array holds type=text even though is saved as image.
<div class=”users”>
<?php
$users = get_users(“fields=all_with_meta”);
foreach ($users as $user) {
echo ‘<h2>’ . $user->fighter_name . ‘</h2>’;
echo ‘<p>’ . $user->perfects_done . ‘</p>’;
echo print_r( get_field_object(‘fighter_pic’) );
}
?>
</div>
returns
Array ( [key] => field_fighter_pic [label] => [name] => fighter_pic [type] => text [order_no] => 1 [instructions] => [required] => 0 [id] => acf-field-fighter_pic [class] => text [conditional_logic] => Array ( [status] => 0 [allorany] => all [rules] => 0 ) [default_value] => [formatting] => html [maxlength] => [placeholder] => [prepend] => [append] => [value] => ) 1
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.