<?php $query = new WP_Query(
array( 'post_type' => 'testimonial' ,
'posts_per_page' => -1,
) );
if ( $query->have_posts() ) : ?>
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<div class="testimonials-name"><?php the_title();?></div>
<div class="testimonials-carousel-content"><p><?php the_content() ;?></p></div>
<?php endwhile; wp_reset_postdata(); ?>
<!-- show pagination here -->
<?php else : ?>
<!-- show 404 error here -->
<?php endif; ?>
I have this query but it display all the testimonial's I want it to display one testimonial at a time how to do this please help
I am not able to do this