testimonials.php 680 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * Query and loop for testimonials.
  4. *
  5. * @package Lodestar
  6. */
  7. ?>
  8. <?php
  9. $testimonials = new WP_Query( array(
  10. 'post_type' => 'jetpack-testimonial',
  11. 'order' => 'ASC',
  12. 'orderby' => 'menu_order',
  13. 'posts_per_page' => 2,
  14. 'no_found_rows' => true,
  15. ) );
  16. ?>
  17. <?php if ( $testimonials->have_posts() ) : ?>
  18. <div id="front-page-testimonials" class="front-testimonials testimonials">
  19. <div class="grid-row">
  20. <?php
  21. while ( $testimonials->have_posts() ) : $testimonials->the_post();
  22. get_template_part( 'components/features/testimonials/content', 'testimonials' );
  23. endwhile;
  24. wp_reset_postdata();
  25. ?>
  26. </div>
  27. </div>
  28. <?php endif; ?>