Support

Account

Home Forums ACF PRO Display Image for each entry on Tag Archive Reply To: Display Image for each entry on Tag Archive

  • John, you’re a genius (even if you didn’t realize it)! That code did the trick:
    http://njcai.pairserver.com/tag/asphaltmaintenanceseal-coating/

    What I ended up with is:

    <?php 
    // Get the logo, if it exists.
    if( get_field('sponsor_logo') ):
    $image = get_field('sponsor_logo');
    if (intval($image) == $image) {
      $image = wp_get_attachment_image_src(intval($image), 'full');
      $image = $image[0];
    }
    ?>
    <img class="sponsorlogo" src="<?php echo $image ; ?>" width="120" height="120" alt="<?php the_field('sponsor_company_name'); ?>">
    <?php endif; ?>

    Thanks so much for your help with this!