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

?>

<div id="post-<?php the_ID(); ?>" <?php post_class('blog-card'); ?>>
  <?php if(has_post_thumbnail()) {  ?>
      <div class="blog-img">
          <?php the_post_thumbnail(); ?>
          <span class="date"><?php the_date(); ?></span>
      </div>
  <?php } ?>
  <div class="blog-content">
    	<ul class="meta-tag">
        <li><a href="<?php echo esc_url(get_author_posts_url(get_the_author_meta('ID'))); ?>"><i class="fas fa-user icon"></i> <?php echo esc_html( get_the_author() ) ?></a> </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>
   	<h3><a href="<?php the_permalink(); ?>"><?php the_title() ?></a></h3>
    	<?php the_excerpt(); ?>
  </div>    
</div>