<div class="post-item">
    <div class="post-item-image">
        <a href="<?php the_permalink() ?>">
            <?php if (has_post_thumbnail()): the_post_thumbnail('medium');
            else:
                echo "<img src='" . esc_url(get_template_directory_uri() . '/images/default.jpg') . "' alt='image'>";
            endif; ?>
        </a>
        <?php $postType = get_post_type();
        $postTypeFa = $postType;
        switch ($postType){
            case "portfolios":
                $postTypeFa = __('Portfolio',TEXT_DOMAIN);
                break;
            case "product":
                $postTypeFa = __('Product',TEXT_DOMAIN);
                break;
            case "post":
                $postTypeFa = __('Post',TEXT_DOMAIN);
                break;
        }?>
        <span class="post-item-cat"><?php echo $postTypeFa;?></span>
    </div>
    <div class="post-item-content">
        <a href="<?php the_permalink() ?>" class="title"><div><?php the_title(); ?></div></a>

        <div class="d-flex align-items-center justify-content-between">
            <div class="post-item-time"><span class="iconlyBulk-Time-Square font-20"><span class="path1"></span><span class="path2"></span></span><span class="ms-2"><?php banta_date( 'j F Y' ,get_the_date('y-m-d'));?></span></div>
            <a href="<?php the_permalink() ?>" class="more">
                <span class="more-title"><?php echo _e('Read More', TEXT_DOMAIN); ?></span>
                <i class="iconly-Arrow-Left icbo font-24"></i>
            </a>
        </div>
    </div>
</div>