<!-- start blog item -->
<article <?php post_class('data'); ?> id="post-<?php the_ID() ?>">

	<!-- start content -->
	<?php if (is_home() || is_search() || is_archive()): ?>
	<div class="post-content">	
		<div class="blog-date">
			<span class="span-day"><?php echo get_the_time('d');?></span>
			<span class="span-month"><?php echo get_the_time('M');?></span>
		</div>
		<?php if (function_exists('printLikes')) { ?>
		<div class="kk-likes">
			<?php printLikes(get_the_ID()); ?>
		</div>
		<?php } ?>
	</div>
	<?php endif; ?>
	
	<div class="blog-content">
		<?php 	
			$url = get_post_meta($post->ID, '_post_link_value', true);
			if(empty($url)) $url= "#";
		?>
		<!--start image -->
		<?php if(has_post_thumbnail()): ?>
		<div class="blog-thumb effect-zoom">
		
		<?php
		$image_thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'featured-image-thumb' );
		
		if ( get_theme_mod( 'kktfwp_blog_sidebar' ) !== 'full') {
			$image_size = 'medium_large';
		} else {
			$image_size = 'large';
		};	?>			
		
			<a href="<?php echo esc_url($url) ?>" target="_blank">
				<?php echo get_the_post_thumbnail( get_the_id(), $image_size, array( 'data-lazy-load' => 0 ) ); ?>
			</a>
			
		</div>
		<?php endif ?>
		<!--end image -->
		
		<h2 class="blog-title">

			&mdash;&nbsp;<?php _e('Link:','toppic');?>&nbsp;
			<a href="<?php echo esc_url($url) ?>" target="_blank"><?php the_title() ?></a>
		</h2>
						
		<!--start meta -->
		<?php get_template_part( 'formats/blog-classic/post-meta' ); ?>
		<!--end meta -->
		
		<div class="blog-entry">
		
		<?php if (is_single()): ?>
			<h3>&mdash;&nbsp;<?php _e('Link:','toppic');?>&nbsp;<a href="<?php echo esc_url($url) ?>" target="_blank"><?php the_title() ?></a></h3>
		<?php endif; ?>
		
			<?php the_content(); ?>
		</div>
		
	</div>
	
</article>
<!-- end blog item -->