<?php
/**
 * Template part for displaying posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 * @package socity
 */
	if (defined('CS_ACTIVE_FRAMEWORK') && function_exists('cs_get_option')) {
	$socity_pfg_meta = get_post_meta( $post->ID, 'socity_pfg_meta', true );
	}
	?>
<div id="post-<?php the_ID(); ?>" <?php post_class('post-single'); ?>>
	<?php if(!empty($socity_pfg_meta['socity_pfg_link'])) : $socity_pfgs = explode(",",$socity_pfg_meta['socity_pfg_link']); ?>
	<div class="socity-pfg">
		<div class="socity-pfg-items" id="socity-post-gallery">
		<?php foreach($socity_pfgs as $socity_pfg) : $socity_pfg_source = wp_get_attachment_image_src($socity_pfg,'socity-pro-larg') ?>
			<div class="item">
				<img src="<?php echo esc_url($socity_pfg_source[0]); ?>" alt="<?php the_title_attribute(); ?>">
			</div>
		<?php endforeach; ?>
		</div>
	</div>
	<?php else : ?>
	<div class="socity-bimg">
		<?php socity_post_thumbnail(); ?>		
	</div>
	<?php endif; ?>
	<?php get_template_part('template-parts/content','summery'); ?>
</div>
