<?php
$query = new WP_Query( $todays_pick_args );
if ( $query->have_posts() ) :
	$todays_pick_title = get_theme_mod( 'macro_news_todays_pick_title', __( 'Todays Pick', 'macro-news' ) );
	?>
	<div class="todays-pick-part">
		<?php if ( ! empty( $todays_pick_title ) ) { ?>
			<div class="section-header">
				<h3 class="section-title"><?php echo esc_html( $todays_pick_title ); ?></h3>
			</div>
		<?php } ?>
		<div class="magazine-section-body">
			<div class="magazine-todays-pick-section-wrapper">
				<?php
				$i = 1;
				while ( $query->have_posts() ) :
					$query->the_post();
					?>
					<div class="mag-post-single has-image small-list-design">
						<div class="mag-post-number-wrap">
							<span class="post-number-counter"><?php echo sprintf( '%02d', absint( $i ) ); ?></span>
						</div>
						<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
					$i++;
				endwhile;
				wp_reset_postdata();
				?>
			</div>
			<div class="post-carousel_dots">
				<?php
				while ( $query->have_posts() ) :
					$query->the_post();
					?>
					<div class="slider_navigators-wrraper">
						<div class="slider_navigators"></div>
					</div>
					<?php
				endwhile;
				wp_reset_postdata();
				?>
			</div>
		</div>
	</div>
	<?php
endif;
