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!
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.