File: /home/zwafgyp/dodolodge-net/wp-content/themes/hotel-wp/inc/widgets/testimonials/tpl/layout-1.php
<?php
/**
* Template for displaying default element.
*
*
* @author ThimPress
* @package Thim_Builder/Templates
* @version 1.0.0
* @author Thimpress, tuanta
*/
$layout = ( isset( $instance['layout'] ) && $instance['layout'] != '' ) ? $instance['layout'] : 'default';
$css_animation = esc_attr( $instance['css_animation'] );
$style = esc_attr( $instance['style'] );
$title = $instance['title'];
$auto = $instance['auto'];
$testimonials_args = array(
'post_type' => 'testimonials',
'posts_per_page' => $instance['number-posts'],
'ignore_sticky_posts' => true,
);
$testimonials_qurey = new WP_Query( $testimonials_args );
?>
<div class="thim-sc-testimonial <?php echo esc_attr($layout) . ' ' . esc_attr($style); ?>" data-animation="<?php echo esc_attr($css_animation); ?>" data-auto="<?php echo esc_attr($auto); ?>">
<h4 class="block-title"><?php echo esc_html($title); ?></h4>
<?php if ( $testimonials_qurey->have_posts() ) : ?>
<div class="owl-carousel owl-theme testimonial-slider-<?php echo esc_attr($style); ?>">
<?php while ( $testimonials_qurey->have_posts() ) : $testimonials_qurey->the_post(); ?>
<div class="testimonial-item">
<div class="testimonial-content"><?php echo get_the_content(); ?></div>
<p class="testimonial-rating"></p>
<h5 class="testimonial-name"><?php the_title( ' ', ' ' ); ?></h5>
</div>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</div>
<?php endif; ?>
</div>
<?php