Image hyperlink issues
-
I have been trying to set up a gallery using a repeater field using the ‘image’ as the subfield. The gallery displays fine, but I cannot get it to open to a larger version of the image when the image on the gallery page is clicked. Instead it merely opens the gallery page in a new tab.
Here is the page in question – https://greenplanetlivestock.com.au/gal/
And here is the code in my template –
while ( have_posts() ) : the_post();
if(have_rows(‘gallery’)):
while(have_rows(‘gallery’)): the_row();
?><div class=”sales-display”><?php
?><div class=”gallery-image”><?php
$image = get_sub_field(‘animal_photo’);
if($image): ?>
“><img src=”<?php echo $image[‘sizes’][‘bovine-gallery’]; ?>” width=”350″ height=”260″ alt=”Image of a Green Planet Livestock animal” />
</div><?php endif;
?></div><?php
endwhile;
endif;
endwhile;Does anyone have any thoughts on what I am doing wrong here?
Thanks
- The topic ‘Image hyperlink issues’ is closed to new replies.