File: /mnt/data/dreamsrent-wp/wp-content/themes/dreamsrent/templates/blog/blog-search.php
<?php $post_id = get_the_ID(); ?>
<?php $sticky_class = is_sticky()?'sticky':''; ?>
<div class="col-lg-12 col-md-12 ">
<article id="post-<?php the_ID(); ?>" <?php post_class('post-wrap '. $sticky_class); ?> >
<div class="blog grid-blog">
<?php if(has_post_thumbnail()){ ?>
<div class="blog-image-list">
<a href="<?php the_permalink(); ?>">
<?php
dreamsrent_content_thumbnail('dreamsrent_bloglist'); ?>
</a>
</div>
<?php } ?>
<div class="blog-content">
<div class="blog-list-date">
<ul class="meta-item-list">
<li>
<div class="post-author">
<div class="post-author-img">
<?php echo get_avatar( get_the_author_meta('ID'), 30); ?>
</div>
<a href="javascript:void(0)"><span><?php the_author(); ?></span></a>
</div>
</li>
<li class="date-icon ms-3">
<i class="fa-solid fa-calendar-days"></i><span><?php echo get_the_date('',$post_id ); ?></span></li>
<?php
$comments = get_comments_number();
$comment_text ='';
if($comments >1)
{
$comment_count = esc_html(get_comments_number());
$comment_text = esc_html__(' Comments' ,'dreamsrent');
}
else if ($comments == 0)
{
$comment_count = '';
$comment_text = esc_html__('No Comments','dreamsrent' );
}
else
{
$comment_count = esc_html(get_comments_number());
$comment_text = esc_html__(' Comment' ,'dreamsrent');
}
?>
<li class="date-icon ms-3"><i class="fa-solid fa-comments"></i><span><?php echo esc_html($comment_count); ?><?php echo esc_html($comment_text); ?></span></li>
</ul>
</div>
<h3 class="blog-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<p class="blog-description"><?php echo mb_strimwidth(get_the_excerpt(), 0, 200, ' ... '); ?></p>
<a href="<?php the_permalink(); ?>" class="viewlink btn btn-primary justify-content-center"><?php echo esc_html__('Read More','dreamsrent'); ?><i class="feather-arrow-right ms-2"></i></a>
</div>
</div>
</article>
</div>