<?php
/**
 * Template part for displaying results in search pages
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package wheelify
*/

?>

<div id="post-<?php the_ID(); ?>" <?php post_class('blog-deatils'); ?>>
    <figure>
        <?php if(has_post_thumbnail()) {  ?>
            <div class="post-img">
                <?php the_post_thumbnail(); ?>
                <p class="post_date"><span class="date"><?php echo esc_html(get_the_date('j')) ?> </span><span class="month"><?php echo esc_html(get_the_date('M')) ?> </span></p>
            </div>
        <?php } ?>
        <figcaption class="blog_post-catipon-inner text-left">
            <div class="blog-inner">
                <h3 class="title"><a href="<?php the_permalink(); ?>"><?php the_title() ?></a></h3>
                <ul class="meta-info">
                    <li><i class="fas fa-user icon"></i><?php echo esc_html( get_the_author() ) ?> </li>
                    <li><i class="fas fa-comments icon"></i> <?php comments_number(); ?> </li>
                    <?php if(has_tag()){ ?>
                        <li><i class="fas fa-tag icon"> </i><?php the_tags('',' , '); ?></li>
                    <?php } ?>
                </ul>
                <?php the_excerpt(); ?>
            </div>
            <a class="btn main-btn" href="<?php the_permalink(); ?>"> <?php echo esc_html('Read more','wheelify'); ?></a>
        </figcaption>
    </figure>
</div>