Home Forums General Issues Images Not Showing Up on Pages Reply To: Images Not Showing Up on Pages

  • Hi Elliott,

    I was excited to try the code found on the page you referred to. After trying it out, it still did not work. This is the code I used with my field name substituted in…it’s been inserted under the word “Profile”:

    $author_id = get_the_author_meta( 'ID' );
    $author_badge = get_field('donor_image1', 'user_'. $author_id ); // image field, return type = "Image Object"
    <img src="<?php echo $author_badge['url']; ?>" alt="<?php echo $author_badge['alt']; ?>" width="200" height="100" />

    Keep in mind that this isn’t for an actual post page but is for an author page (author.php). The url is or Given that the author ID is 11, I would think that the code would pull that in dynamically and then look for the appropriate image field which is donor_image1 and then display it accordingly. As you can see this is not happening. Is there something else I need to add to the code?