<?php
$ido = get_the_ID();
$post = get_post($ido);
$slug = $post->post_name;
$images = acf_photo_gallery(‘galeria’, $post->ID);
$thumbnail_id = get_post_thumbnail_id( $post->ID );
$alt = get_post_meta($thumbnail_id, ‘_wp_attachment_image_alt’, true);
?>
<div class=”galeria-biografia swiper-container”>
<div class=”swiper-wrapper”>
<div class=”swiper-slide”>
<div class=”thumbnail”>” data-caption=”<?php echo $alt;?>” data-fancybox=”gallery-<?php echo $slug; ?>” > <?php echo get_the_post_thumbnail($ido,’thumbnail’,$attr); ?>
</div></div>
<?php foreach( $images as $image ):
$id = $image[‘id’];
$alt = get_field(‘photo_gallery_alt’, $id); //Get the alt which is a extra field (See below how to add extra fields)
$class = get_field(‘photo_gallery_class’, $id);
$full_image_url= $image[‘full_image_url’]; //Full size image url
$full_image_url2 = acf_photo_gallery_resize_image($full_image_url, 150, 150); //Resized size to 262px width by 160px height image url
?>
<div class=”swiper-slide”>
<div class=”thumbnail”>
” data-caption=”<?php echo $alt;?>” data-fancybox=”gallery-<?php echo $slug; ?>”>
” alt=”<?php echo $title; ?>” title=”<?php echo $title; ?>”>
</div>
</div>
<?php endforeach; ?>
</div>
<!– If we need pagination –>
<div class=”swiper-pagination”></div>
<!– If we need navigation buttons –>
<div class=”swiper-button-prev”></div>
<div class=”swiper-button-next”></div>
</div>
<?php // ?>