
<?php /**
 * Template Name: Gallery Page
 * The main template file for display gallery page.
 *
 * @package WordPress
*/

 get_header(); ?>

 <?php /* The loop */ ?>
            <?php while ( have_posts() ) : the_post(); ?>
            
<section class="blog mt-80 mb-80 px-50 radius-20 gradient-bg-6 pt-100 pb-100">
            <div class="container mxw_1400">
			 <?php
	  $gallery = get_post_meta(get_the_ID(), 'wpsimplegallery_gallery', true);
			 if (is_array($gallery) && count($gallery) > 0) {
			           foreach ($gallery as $thumbid) {
			               $image = wp_get_attachment_image_src($thumbid, 'swap-gallery-list', true);
			               $image_full = wp_get_attachment_image_src($thumbid, 'full', true);
			               ?>
                <div class="blog-post-item blog-post-single">
                    <div class="xb-item--thumb radius-20 pos-rel">
						<a href="<?php echo $image_full[0]; ?>" class="btn-zomm" title="<?php echo the_title();?>">
                        <img src="<?php echo $image[0]; ?>" alt="<?php echo the_title();?>">
						</a>
                    </div>
				</div>
				  <?php   }
          
        }
?>
      

			
			</div>
</section>
 <?php endwhile; ?>




<?php get_footer(); ?>