<?php
/**
* The template for displaying archive pages.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package FreshWP WordPress Theme
* @copyright Copyright (C) 2025 ThemesDNA
* @license licennse URI, for example : http://www.gnu.org/licenses/gpl-2.0.html
* @author ThemesDNA <themesdna@gmail.com>
*/

get_header(); ?>

<div class='freshwp-content-outer-container'>
<div class='freshwp-container'>
<div id='freshwp-content-wrapper'>

<div id='freshwp-content-inner-wrapper'>

<div class='freshwp-main-wrapper' id='freshwp-main-wrapper' itemscope='itemscope' itemtype='http://schema.org/Blog' role='main'>
<div class='theiaStickySidebar'>
<div class='freshwp-main-wrapper-inside freshwp-clearfix'>

<?php freshwp_before_main_content(); ?>

<?php if(is_home() && !is_paged()) { ?>
<div class="freshwp-featured-posts-area freshwp-clearfix">
<?php dynamic_sidebar( 'freshwp-home-top-widgets' ); ?>
</div>
<?php } ?>

<div class="freshwp-featured-posts-area freshwp-clearfix">
<?php dynamic_sidebar( 'freshwp-top-widgets' ); ?>
</div>

<div class="freshwp-posts-wrapper" id="freshwp-posts-wrapper">

<div class="freshwp-posts freshwp-box">

<header class="page-header">
<?php the_archive_title( '<h1 class="page-title">', '</h1>' ); ?>
<?php the_archive_description( '<div class="taxonomy-description">', '</div>' ); ?>
</header>

<div class="freshwp-posts-content">

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

    <div class="freshwp-posts-container">
    <?php while (have_posts()) : the_post(); ?>

        <?php get_template_part( 'template-parts/content', freshwp_post_style() ); ?>

    <?php endwhile; ?>
    </div>
    <div class="clear"></div>

    <?php freshwp_posts_navigation(); ?>

<?php else : ?>

  <?php get_template_part( 'template-parts/content', 'none' ); ?>

<?php endif; ?>

</div>
</div>

</div><!--/#freshwp-posts-wrapper -->

<?php if(is_home() && !is_paged()) { ?>
<div class='freshwp-featured-posts-area freshwp-clearfix'>
<?php dynamic_sidebar( 'freshwp-home-bottom-widgets' ); ?>
</div>
<?php } ?>

<div class='freshwp-featured-posts-area freshwp-clearfix'>
<?php dynamic_sidebar( 'freshwp-bottom-widgets' ); ?>
</div>

<?php freshwp_after_main_content(); ?>

</div>
</div>
</div>

<?php get_sidebar(); ?>

</div>

</div>
</div>
</div>

<?php get_footer(); ?>