<?php
/**
 * Template part for displaying posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package NewsBox Plus
 */
$newsbox_plus_categories = get_the_category();
	if($newsbox_plus_categories){
		$newsbox_plus_category = $newsbox_plus_categories[mt_rand(0,count( $newsbox_plus_categories)-1)];
	}else{
		$newsbox_plus_category = '';
	}
?>
<article id="post-<?php the_ID(); ?>" <?php post_class('newsbox-plus-list-item'); ?>>
	<div class="newsbox-plus-item newsbox-plus-text-list shadow-sm mb-5 <?php if(has_post_thumbnail( )): ?>has-thumbnail<?php endif; ?>">
	<div class="row">
		<?php if(has_post_thumbnail( )): ?>
		<div class="col-lg-6">
			<a href="<?php the_permalink(); ?>">
			<?php the_post_thumbnail('medium_large'); ?>
			</a>
		</div>
		<div class="col-lg-6">
		<?php else: ?>
			<div class="col-lg-12 pb-3 pt-3">
		<?php endif; ?>
			<div class="newsbox-plus-text p-3">
				<div class="newsbox-plus-text-inner">
					<div class="grid-head">
						
				<?php the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); ?>
					<span class="ghead-meta list-meta">
						<?php echo esc_html( get_the_date()); ?>
					</span>
					</div>
					<?php the_excerpt(); ?>
					<a class="newsbox-plus-readmore" href="<?php the_permalink(); ?>"><?php esc_html_e( 'Read More ','newsbox-plus'); ?> <i class="fas fa-long-arrow-alt-right"></i></a>
				</div>
			</div>
		</div>
	</div>
		
	</div>
</article><!-- #post-<?php the_ID(); ?> -->