Home › Forums › Add-ons › Gallery Field › Image of gallery as thumbnail on taxonamy page › Reply To: Image of gallery as thumbnail on taxonamy page
just to get sure: you have no problem to show the gallery at the taxonomy page?
but you wish to show only the first image from that gallery?
have you try something like that?:
<?php
$images = get_field('gallery_images');
if( $images ){
$image_1 = $images[0];
}
?>
<a href="<?php echo $image_1['url']; ?>">
<img src="<?php echo $image_1['sizes']['large']; ?>" alt="<?php echo $image_1['alt']; ?>" />
</a>
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.