File: /home/zwafgyp/dodolodge-net/wp-content/themes/hotel-wp/inc/widgets/testimonials/tpl/layout-3.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_query = new WP_Query( $testimonials_args );
?>
<div class="thim-sc-testimonials <?php echo esc_attr($layout)?>" data-animation="<?php echo esc_attr($css_animation); ?>">
<?php if ( $testimonials_query->have_posts() ) : ?>
<div class="testimonial-slider">
<?php while ( $testimonials_query->have_posts() ) : $testimonials_query->the_post(); ?>
<div class="testimonial-item-wrapper">
<div class="testimonial-item">
<div class="testimonial-content"><?php echo get_the_content(); ?></div>
<p class="testimonial-rating"></p>
<p class="testimonial-name"><?php the_title( ' ', ' ' ); ?></p>
</div>
</div>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</div>
<?php endif; ?>
</div>
<?php