Support

Account

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