File: /mnt/data/smarthr-co-in/wp-content/themes/dreamslanding/archive-case_study.php
<?php
get_header();
?>
<div class="content">
<div class="container">
<div class="row">
<div class="col-xl-12 col-lg-12">
<div class="row">
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$query = new WP_Query([
'post_type' => 'case_study',
'paged' => $paged,
'posts_per_page' => get_option('posts_per_page')
]);
if ( $query->have_posts() ) :
while ( $query->have_posts() ) : $query->the_post();
$post_id = get_the_ID();
?>
<div class="col-xl-12 blog_post_list_item">
<div class="blog-item wow fadeInUp" data-wow-delay="0.2s">
<?php if (has_post_thumbnail()) { ?>
<a href="<?php the_permalink(); ?>" class="blog-img">
<?php if ( function_exists('dreamstour_content_thumbnail') ) { dreamstour_content_thumbnail('dreamstour_bloglist'); } else { the_post_thumbnail('large'); } ?>
</a>
<?php } ?>
<div class="blog-info text-center1">
<div class="d-inline-flex align-items-center justify-content-center">
<div class="d-inline-flex align-items-center border-end pe-3 me-3 mb-2">
<a href="<?php echo esc_url(get_author_posts_url(get_the_author_meta('ID'))); ?>" class="d-flex align-items-center">
<span class="avatar avatar-sm me-2">
<?php echo get_avatar(get_the_author_meta('ID'), 40, '', '', ['class' => 'rounded-circle border border-white']); ?>
</span>
<p class="mb-0 text-white1"><?php the_author(); ?></p>
</a>
</div>
<p class="text-white1 mb-2">
<i class="isax isax-calendar-2 me-2"></i>
<?php echo get_the_date('d M Y'); ?>
</p>
</div>
<h5 class="mt-2"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h5>
<p class="text-white1-50"><?php echo wp_trim_words(get_the_excerpt(), 20, '...'); ?></p>
<a href="<?php the_permalink(); ?>" class="btn btn-primary btn-sm mt-2">
<?php echo esc_html__('Read More','dreamstour'); ?>
<i class="feather-arrow-right ms-2"></i>
</a>
</div>
</div>
</div>
<?php
endwhile;
?>
<div class="col-12">
<?php if ( function_exists('dreamstour_pagination_theme') ) { dreamstour_pagination_theme(); } else { the_posts_pagination(); } ?>
</div>
<?php
wp_reset_postdata();
else:
get_template_part( 'template-parts/blog/content', 'none' );
endif;
?>
</div>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>