<?php
$query = new WP_Query( $most_recent_args );
if ( $query->have_posts() ) :
	$most_recent_title = get_theme_mod( 'macro_news_most_recent_title', __( 'Most Recent', 'macro-news' ) );
	?>
	<div class="most-recent-part">
		<?php if ( ! empty( $most_recent_title ) ) : ?>
			<div class="section-header">
				<h3 class="section-title"><?php echo esc_html( $most_recent_title ); ?></h3>
			</div>
		<?php endif; ?>
		<div class="magazine-section-body">
			<div class="most-recent-wrapper">
				<?php
				while ( $query->have_posts() ) :
					$query->the_post();
					?>
					<div class="mag-post-single has-image tile-design">
						<?php if ( has_post_thumbnail() ) { ?>
							<div class="mag-post-img">
								<a href="<?php the_permalink(); ?>">
									<?php the_post_thumbnail(); ?>
								</a>
							</div>
						<?php } ?>
						<div class="mag-post-detail">
							<div class="mag-post-category with-background">
								<?php macro_news_categories_list(); ?>
							</div>
							<h3 class="mag-post-title">
								<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
							</h3>
							<div class="mag-post-meta">
								<?php
								macro_news_posted_by();
								macro_news_posted_on();
								?>
							</div>
						</div>
					</div>
					<?php
				endwhile;
				wp_reset_postdata();
				?>
			</div>	
		</div>	
	</div>
	<?php
endif;
