<div class="container main-content">
    <div class="row">
        <?php do_action('top_post_widget'); ?>
        <div class="col-sm-12 col-lg-9 pal_0 content content-fix">
            <div class="main hid_pad home-col">
                <?php
                if (is_home()) {
                } else {
                    echo '<div class="breadcrumb_DB" style="margin-bottom: 1rem;">';
                    get_breadcrumb();
                    echo '</div>';
                }
                ?>
                <article class="root">
                    <?php if (is_category()) : ?>
                        <div class="content_item">
                            <div class="content_item_time">
                                <div class="content_item__time">
                                    <div class="content_item__time">
                                        <?php $archive_year  = get_the_time('Y'); ?>
                                        <?php $archive_month = get_the_time('m'); ?>
                                            <span class="content_item__icon"><i class="fal fa-folder-tree"></i></span>
                                    </div>
                                </div>
                            </div>
                            <div class="content_item__cart">
                                <article class="content_item__cart__link">
                                    <div class="title-category-header post-content" style="border: 0;">
                                        <h1 class="cb-module-title"><?php echo single_cat_title(''); ?></h1>
                                        <?php the_archive_description('<div class="taxonomy-description">', '</div>'); ?>
                                    </div>
                                </article>
                            </div>
                        </div>
                        <?php
                    endif;
                    if (is_tag()) : ?>
                        <div class="content_item">
                            <div class="content_item_time">
                                <div class="content_item__time">
                                    <div class="content_item__time">
                                        <?php $archive_year  = get_the_time('Y'); ?>
                                        <?php $archive_month = get_the_time('m'); ?>
                                            <span class="content_item__icon"><i class="fal fa-folder-tree"></i></span>
                                    </div>
                                </div>
                            </div>
                            <div class="content_item__cart">
                                <article class="content_item__cart__link">
                                    <div class="title-category-header post-content" style="border: 0;">
                                        <h1 class="cb-module-title"><?php echo single_cat_title(''); ?></h1>
                                        <?php the_archive_description('<div class="taxonomy-description">', '</div>'); ?>
                                    </div>
                                </article>
                            </div>
                        </div>
                        <?php
                    endif;
                    if (have_posts()) : while (have_posts()) : the_post(); ?>
                            <div class="content_item">
                                <div class="content_item_time">
                                    <div class="content_item__time">
                                        <div class="content_item__time">
                                            <?php $archive_year  = get_the_time('Y'); ?>
                                            <?php $archive_month = get_the_time('m'); ?>
                                                <span class="content_item__icon"><i class="fal fa-clock"></i></span>
                                                <span class="content_item__timeago">
                                                    <time><?php echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' پیش'; ?></time>
                                                </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="content_item__cart">
                                    <article class="content_item__cart__link">
                                        <div class="content_item__cart__media">
                                            <a href="<?php the_permalink(); ?>">
                                                <figure class="content_item__cart__media__image">
                                                    <?php
                                                    if (has_post_thumbnail()) {
                                                        the_post_thumbnail(array(300, 300), array('alt' => '' . get_the_title(), 'title' => '' . get_the_title() . ''));
                                                    } else { ?>
                                                        <img src="<?php bloginfo('template_url'); ?>/assets/images/thumb.gif" width="60" height="60" alt="<?php _e('Image not found', 'leora'); ?>" title="<?php _e('Image not found', 'leora'); ?>">
                                                    <?php } ?>
                                                </figure>
                                            </a>
                                        </div>
                                        <div class="content_item__cart__detail">
                                            <div class="content_item__cart__detail__container">
                                                <div class="content_item__cart__detail-top">
                                                    <h5 class="content_item__cart__detail__category">
                                                        <?php the_category(); ?>
                                                    </h5>
                                                    <span class="content_item__cart__detail__time">
                                                        <?php $archive_year  = get_the_time('Y'); ?>
                                                        <?php $archive_month = get_the_time('m'); ?>
                                                        <a href="<?php echo get_month_link($archive_year, $archive_month); ?>">
                                                            <time><?php echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' پیش'; ?></time>
                                                        </a>
                                                    </span>
                                                </div>
                                                <h3 class="content_item__cart__detail__title">
                                                    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
                                                </h3>
                                                <div class="content_item__cart__detail__excerpt">
                                                    <div class="desc">
                                                        <?php echo '<p class="text text_1">' . get_the_excerpt() . '</p>'; ?>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </article>
                                </div>
                            </div>
                        <?php endwhile;
                    else : ?>
                        <p><?php _e('Sorry, no posts matched your criteria.', 'leora'); ?></p>
                    <?php endif; ?>
                    <?php get_template_part('themeplat/content/pagenumbers', 'pagenumbers'); ?>
                </article>
            </div>
        </div>
        <?php 
        do_action('down_post_widget');
        get_sidebar('page'); ?>
    </div>
</div>