<?php
$section_title   = get_theme_mod( 'newsbreeze_main_news_title', __( 'Main News', 'newsbreeze' ) );
$main_news_query = new WP_Query( $main_news_args );
if ( $main_news_query->have_posts() ) {
	?>
	<div class="slider-part">
		<?php if ( ! empty( $section_title ) ) { ?>
			<div class="section-header">
				<h3 class="section-title"><?php echo esc_html( $section_title ); ?></h3>
			</div>
		<?php } ?>
		<div class="banner-slider magazine-carousel-slider-navigation">
			<?php
			while ( $main_news_query->have_posts() ) :
				$main_news_query->the_post();
				?>
				<div class="mag-post-single banner-grid-single <?php echo esc_attr( has_post_thumbnail() ? 'has-image' : '' ); ?> grid-design">
					<div class="mag-post-img">
						<a href="<?php the_permalink(); ?>">
							<?php the_post_thumbnail( 'full' ); ?>
						</a>
					</div>
					<div class="mag-post-detail">
						<div class="mag-post-category with-background">
							<?php newsbreeze_categories_list(); ?>
						</div>
						<h3 class="mag-post-title">
							<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
						</h3>
						<div class="mag-post-meta">
							<?php
							newsbreeze_posted_by();
							newsbreeze_posted_on();
							?>
						</div>
					</div>
				</div>
				<?php
			endwhile;
			wp_reset_postdata();
			?>
		</div>
	</div>
	<?php
}
