Home › Forums › Add-ons › Gallery Field › Fancybox Slideshow from One Image › Reply To: Fancybox Slideshow from One Image
I solved it by using some CSS.
<?php
$images = get_field('gallery');
$image_1 = $images[0];
?>
<?php foreach( $images as $image ): ?>
<a href="<?php echo $image['url']; ?>" rel="fancybox"><img src="<?php echo $image_1['url']; ?>" /></a>
<?php endforeach; ?>
<div id="slideshow_thumb_info">
<?php echo $image_1['title']; ?><br>
<?php echo $image_1['caption']; ?>
</div>
#slideshow_thumb img {
display:none;
width:100%;
height:auto;
}
#slideshow_thumb a:first-of-type img{
display:block;
}
#slideshow_thumb_info {
color:black;
padding-top: 10px;
font-size: 10px;
line-height: 12px;
}
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.