<?php 
/* 
 * used to display blog posts items in archives and listings 
 *
 * need to be called within the loop
 */
 ?>	
<?php 
$caticoncolor="";
$category_icon_code ="";
$category_icon="";
$category_icon_color="";
global $cat_id;
?> 
<div class="blogPost <?php if(is_sticky()){ echo "stickyPost";} ?>">
	<?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
	<div class="stickInner"><p><?php esc_html_e( 'Featured', 'classiera' ); ?></p></div>
	<?php endif; ?>
	<div class="blog-post-head">
		<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
		<p>
			<i class="fa fa-user"></i>
			<span><?php esc_html_e( 'Posted By', 'classiera' ); ?>:</span>
			<strong><?php the_author(); ?></strong>
			<i class="fa fa-calendar-o"></i>
			<span><?php the_time( 'jS F, Y'); ?></span>
			<i class="fa fa-comments"></i>
			<span><?php esc_html_e( 'Comments', 'classiera' ); ?></span>
			<strong><?php echo comments_number(); ?></strong>
			<?php $postCatgory = get_the_category( $post->ID ); ?>
			<i class="fa fa-folder-o"></i>
			<span class="cat"><?php echo $postCatgory[0]->name; ?></span>
		</p>
	</div><!--blog-post-head -->
	<?php 
	
		//display featured image if any
		if ( has_post_thumbnail() ){?>
	<div class="blog-media">
		<?php the_post_thumbnail('large'); ?>
	</div><!--blog-media -->
		<?php } ?>
	<div class="blog-post-desc">
		<?php the_excerpt(); ?>
		<p><a href="<?php the_permalink(); ?>" class="button round"><?php esc_html_e( 'Read More', 'classiera' ); ?></a></p>
		<div class="share">
			<div class="row collapse">
				<div class="large-10 medium-10 columns">
					<div class="tags">
						<span class="shareIcon blogId"><i class="fa fa-tags"></i><?php esc_html_e( 'Tags', 'classiera' ); ?> : </span>
						<?php //echo get_the_term_list( $post->ID, 'post_tag', '', ',', '' ) ?>
						<?php echo get_the_term_list( $post->ID, 'post_tag', '<ul class="inline-list removeMargin"><li>', '</li><li>', '</li></ul>' ); ?>
					</div><!--tags -->
				</div><!--large-6 medium-6 columns -->				
			</div><!--row -->
		</div><!--share --> 
	</div><!--blog-post-desc -->
</div><!--blogPost -->