Support

Account

Home Forums General Issues User info by page name Reply To: User info by page name

  • Hi @sc-leslie

    You should be able to get the image by using this code:

    <?php $background = get_field('background_image_field_name', 'user_'.$user_info->ID); ?>
    <img src="<?php echo $background['url']; ?>" alt="<?php echo $background['alt']; ?>" />

    Please change the “background_image_field_name” with the name of your custom field.

    You can check the $background value by using this code:

    echo '<pre>';
    var_dump($background);
    echo '</pre>';

    If it doesn’t work, could you please share the JSON export of your field group and the PHP file of the template?

    Thanks!