Skip to content

Instantly share code, notes, and snippets.

@hmbashar
Last active September 13, 2019 19:07
Show Gist options
  • Save hmbashar/c8267456c0201a99529149c65877e882 to your computer and use it in GitHub Desktop.
Save hmbashar/c8267456c0201a99529149c65877e882 to your computer and use it in GitHub Desktop.
<div class="shape-testimonials-left-review">
<div class="row testimonial-masonry-area">
<?php
$shae_testimonial_count = $shape_option['shape-testimonial-tesi-count'];
if(isset($shae_testimonial_count) && !empty($shae_testimonial_count)) {
$shape_tesi_count = $shae_testimonial_count;
}else {
$shape_tesi_count = -1;
}
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
$shape_testimonial = new WP_Query(array(
'post_type' => 'shape-testimonial',
'posts_per_page'=> $shape_tesi_count,
'paged' => $page,
));
if($shape_testimonial->have_posts()) : while($shape_testimonial->have_posts()) : $shape_testimonial->the_post();
?>
<!--single testimonials review start -->
<div class="col-xl-6 col-md-6 col-sm-12 col-12 single-testimonial-masonry">
<div class="single-left-testimonials-review">
<div class="shape-review-left-single-icon">
<i class="fa fa-quote-left" aria-hidden="true"></i>
</div>
<div class="shape-review-left-single-content">
<?php the_content(); ?>
<h3><?php the_title(); ?></h3>
</div>
</div>
</div><!--single testimonials review end -->
<?php endwhile; endif; ?>
</div>
<div class="row">
<div class="col-xl-12">
<!--Pagination -->
<div class="shape-pageination text-center m-auto shapehost-blog-pagination">
<?php
echo paginate_links( array(
'total' => $shape_testimonial->max_num_pages,
'current' => max(1, get_query_var( 'paged')),
'prev_text' => '<i class="fa fa-angle-double-left" aria-hidden="true"></i></a>',
'next_text' => '<i class="fa fa-angle-double-right" aria-hidden="true"></i></a>',
) );
?>
</div><!--/ Pagination -->
<?php
wp_reset_query();
?>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment