<?php
$featured_news_query = new WP_Query( $featured_news_args );
if ( $featured_news_query->have_posts() ) {
	?>
	<div class="featured-posts">
		<div class="featured-posts-wrap">
			<?php
			while ( $featured_news_query->have_posts() ) :
				$featured_news_query->the_post();
				?>
				<div class="blog-post-container small-list-layout">
					<div class="blog-post-inner">
						<?php if ( has_post_thumbnail() ) { ?>
							<div class="blog-post-image">
								<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'post-thumbnail' ); ?></a>
							</div>
						<?php } ?>
						<div class="blog-post-detail">
							<h2 class="entry-title">
								<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
							</h2>
							<div class="post-meta">
								<?php
								prime_mag_posted_by();
								prime_mag_posted_on();
								?>
								<span class="post-comment">
									<i class="fa-regular fa-comment"></i><?php echo absint( get_comments_number( get_the_ID() ) ); ?>
								</span>
							</div>
						</div>
					</div>
				</div>
				<?php
			endwhile;
			wp_reset_postdata();
			?>
		</div>
	</div>
	<?php
}
