<?php $featured_title = get_theme_mod( 'social_news_banner_featured_posts_title', __( 'Featured News', 'social-news' ) ); ?>
<!-- Banner Featured Posts -->
<div class="featured-posts-outer">
	<div class="featured-posts-inside">
		<?php if ( ! empty( $featured_title ) ) : ?>
			<div class="widget-header">
				<h3 class="widget-title"><?php echo esc_html( $featured_title ); ?></h3>
			</div>
		<?php endif; ?>
		<div class="featured-posts">
			<?php
			$featured_posts_query = new WP_Query( $featured_posts_args );
			if ( $featured_posts_query->have_posts() ) {
				while ( $featured_posts_query->have_posts() ) :
					$featured_posts_query->the_post();
					?>
					<div class="post-item overlay-post">
						<div class="post-item-image">
							<a href="<?php the_permalink(); ?>">
								<?php the_post_thumbnail(); ?>							
							</a>
						</div>
						<div class="post-item-content">
							<div class="entry-cat">
								<?php the_category( '', '', get_the_ID() ); ?>						
							</div>
							<h3 class="entry-title">
								<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
							</h3>  
							<ul class="entry-meta">
								<li class="post-author"> <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>"><span class="far fa-user"></span><?php echo esc_html( get_the_author() ); ?></a></li>
								<li class="post-date"> <span class="far fa-calendar-alt"></span><?php echo esc_html( get_the_date() ); ?></li>
								<li class="post-comment"> <span class="far fa-comment"></span><?php echo absint( get_comments_number( get_the_ID() ) ); ?></li>
							</ul>
						</div>
					</div>
					<?php
				endwhile;
				wp_reset_postdata();
			}
			?>
		</div>
	</div>
</div>
<!-- End Banner Featured Posts -->
