<?php
/**
 * The template for displaying archive pages
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package razan-payamava
 */

get_header();
?>

<?php
if (function_exists('rank_math_the_breadcrumbs')) { ?>
	<div class="responsiveBreadCramp mainView">
		<div class="rankMathBC">
			<?php
			rank_math_the_breadcrumbs();
			?>
		</div>
	</div>
<?php } ?>



<div class="titlePageCustome mainView">


	<div class="titlePageCustomeIMG">
		<img src="<?php echo get_template_directory_uri(); ?>/assets/img/bgglobal.webp" alt="">
	</div>


	<div class="rankMathBC">
		<?php
		if (function_exists('rank_math_the_breadcrumbs')) {
			rank_math_the_breadcrumbs();
		} ?>
	</div>

	<div class="mainHeaderContent">
		<span>CATEGORY</span>
		<h1><?php
		if (is_category()) {
			single_cat_title();
		} elseif (is_tag()) {
			single_tag_title();
		} elseif (is_tax()) {
			single_term_title();
		} elseif (is_post_type_archive()) {
			post_type_archive_title();
		} elseif (is_author()) {
			the_author();
		} elseif (is_date()) {
			echo get_the_date();
		} else {
			_e('آرشیو', 'text-domain');
		}
		?></h1>
	</div>


</div>






<main id="primary" class="site-main mainView">



	<?php if (have_posts()): ?>

		<?php

		echo '<div class="archiveBlogParent">';

		while (have_posts()):

			the_post();

			get_template_part('template-parts/cards/content', 'product');

		endwhile;

		echo '</div>';

		pagainate_link_function();

	else:

		echo "<p class='nothingFoundPara'>" . esc_html__('هیچ محصولی یافت نشد.', 'textdomain') . "</p>";

	endif;
	?>




</main>

<?php
get_footer();
