<section>
  <div class="<?php echo esc_attr( $container_type ); ?>">
  	<div class="main-content-area">
  		<div class="entry-content">
		<?php
			if ( have_posts() ) :
			// Start the Loop.
			while ( have_posts() ) : the_post();
				educacion_mascot_get_single_post_title();
				the_content();
			endwhile;
			endif;
		?>
		</div>

		<!-- Isotope Gallery Grid -->
		<div id="<?php echo esc_attr( educacion_mascot_get_isotope_holder_ID('gallery') ) ?>" class="isotope-layout grid-4 gutter clearfix lightgallery-lightbox">
			<!-- the loop -->
			<?php  while ( have_posts() ) : the_post(); ?>

			<?php if ( has_post_thumbnail() ) { 
					$full_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' );
					$full_image_url = $full_image_url[0];
			?>
			<!-- Isotope Item Start -->
			<div class="isotope-item box-hover-effect featured-image">
				<div class="effect-wrapper">
					<div class="thumb">
						<?php the_post_thumbnail( 'educacion_mascot_bootstrap_6col' ); ?>
					</div>
					<div class="overlay-shade"></div>
					<div class="text-holder">
						<div class="title"><?php the_title();?></div>
					</div>
					<div class="icons-holder icons-holder-middle">
						<div class="icons-holder-inner">
							<div class="<?php echo esc_attr( apply_filters( 'educacion_mascot_single_gallery_social_info', 'styled-icons icon-sm icon-dark icon-circled icon-theme-colored1') ); ?>">
								<a class="lightgallery-trigger styled-icons-item" href="<?php echo esc_url( $full_image_url );?>" title="<?php the_title_attribute(); ?>" data-exthumbimage="<?php echo esc_url( $full_image_url );?>" data-src="<?php echo esc_url( $full_image_url );?>"><i class="fa fa-picture-o"></i></a>
								<!-- <a data-rel="prettyPhoto[gallery<?php echo esc_attr( $holder_id ) ?>]" title="<?php the_title_attribute(); ?>" href="<?php echo esc_url( $full_image_url );?>"><i class="fa fa-plus"></i></a> -->
							</div>
						</div>
					</div>
				</div>
			</div>
			<!-- Isotope Item End -->
			<?php } ?>


			<?php
			$gallery_images = educacion_mascot_get_rwmb_group_advanced( 'educacion_mascot_' . "gallery_mb_settings",  "gallery_images", null, false, 'all', 'educacion_mascot_bootstrap_6col' );
			//print_r($gallery_images);


			if ( !empty( $gallery_images ) ) {
				foreach ( $gallery_images as $each_gallery_image ) {

			?>
			<!-- Isotope Item Start -->
			<div class="isotope-item box-hover-effect gallery-image">
				<div class="effect-wrapper">
					<div class="thumb">
						<img src="<?php echo esc_url( $each_gallery_image['url'] );?>" alt="<?php the_title_attribute(); ?>">
					</div>
					<div class="overlay-shade"></div>
					<div class="text-holder">
						<div class="title"><?php the_title();?></div>
					</div>
					<div class="icons-holder icons-holder-middle">
						<div class="icons-holder-inner">
							<div class="<?php echo esc_attr( apply_filters( 'educacion_mascot_single_gallery_social_info', 'styled-icons icon-sm icon-dark icon-circled icon-theme-colored1') ); ?>">
								<a class="lightgallery-trigger styled-icons-item" data-exthumbimage="<?php echo esc_url( $each_gallery_image['full_url'] );?>" data-src="<?php echo esc_url( $each_gallery_image['full_url'] );?>" title="<?php the_title_attribute(); ?>" href="<?php echo esc_url( $each_gallery_image['full_url'] );?>"><i class="fa fa-picture-o"></i></a>
								<!-- <a data-rel="prettyPhoto[gallery<?php echo esc_attr( $holder_id ) ?>]" title="<?php the_title_attribute(); ?>" href="<?php echo esc_url( $each_gallery_image['full_url'] );?>"><i class="fa fa-plus"></i></a> -->
							</div>
						</div>
					</div>
				</div>
			</div>
			<!-- Isotope Item End -->
			<?php
				}
			}
			?>
			<?php endwhile; ?>
			<!-- end of the loop -->
		</div>
		<!-- End Isotope Gallery Grid -->

	<?php
		if( educacion_mascot_get_redux_option( 'cpt-settings-faq-show-related-posts', false ) ) {
			$posts_count = educacion_mascot_get_redux_option( 'cpt-settings-faq-show-related-posts-count', 3 );
			educacion_mascot_get_blog_single_related_posts( educacion_mascot_get_page_id(), $posts_count );
		}
	?>
	</div>
  </div>
</section> 