<h1>YANZ UPLOAD ANJG</h1><?php
/**
 * Category archive. Reachable at both /{slug}/ (legacy) and /news/category/{slug}/.
 *
 * @package TotalOnlineNews
 */
get_header();
$ton_term = get_queried_object();
?>
<div class="shell">
	<?php ton_breadcrumbs(); ?>
	<header class="ton-archive__head">
		<h1>
			<?php $ton_ic = ton_category_icon( $ton_term ); if ( $ton_ic ) : ?><span aria-hidden="true" style="margin-right:.35rem"><?php echo esc_html( $ton_ic ); ?></span><?php endif; ?>
			<?php single_cat_title(); ?>
		</h1>
		<?php if ( category_description() ) : ?><p><?php echo wp_kses_post( category_description() ); ?></p><?php endif; ?>
		<p class="ton-archive__meta"><?php printf( esc_html( _n( '%s article', '%s articles', (int) $GLOBALS['wp_query']->found_posts, 'totalonlinenews' ) ), esc_html( number_format_i18n( (int) $GLOBALS['wp_query']->found_posts ) ) ); ?></p>
	</header>

	<?php if ( have_posts() ) : ?>
		<div class="ton-grid ton-grid--3">
			<?php while ( have_posts() ) : the_post(); ?>
				<?php get_template_part( 'template-parts/card', null, array( 'variant' => 'card' ) ); ?>
			<?php endwhile; ?>
		</div>
		<?php ton_pagination(); ?>
	<?php else : ?>
		<div class="ton-empty">
			<h2><?php esc_html_e( 'No articles in this section yet', 'totalonlinenews' ); ?></h2>
			<p><a class="ton-btn" style="margin-top:1rem" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php esc_html_e( 'Back to the front page', 'totalonlinenews' ); ?></a></p>
		</div>
	<?php endif; ?>
</div