archive-jetpack-testimonial.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /**
  3. * The template for displaying the Testimonials archive page.
  4. *
  5. * @package Lodestar
  6. */
  7. get_header(); ?>
  8. <div class="wrap">
  9. <div id="primary" class="content-area">
  10. <main id="main" class="site-main" role="main">
  11. <?php $jetpack_options = get_theme_mod( 'jetpack_testimonials' ); ?>
  12. <?php if ( isset( $jetpack_options['featured-image'] ) && '' !== $jetpack_options['featured-image'] ) : ?>
  13. <div class="lodestar-hero">
  14. <?php echo wp_get_attachment_image( ( int ) $jetpack_options['featured-image'], 'lodestar-featured-image' ); ?>
  15. </div>
  16. <?php endif; ?>
  17. <?php if ( '' !== $jetpack_options['page-content'] ) : // only display if content not empty ?>
  18. <header class="entry-header">
  19. <h1 class="entry-title">
  20. <?php
  21. if ( isset( $jetpack_options['page-title'] ) && '' !== $jetpack_options['page-title'] ) {
  22. echo esc_html( $jetpack_options['page-title'] );
  23. } else {
  24. esc_html_e( 'Testimonials', 'lodestar' );
  25. }
  26. ?>
  27. </h1>
  28. </header>
  29. <article class="hentry">
  30. <div class="entry-content">
  31. <?php echo convert_chars( convert_smilies( wptexturize( wp_kses_post( $jetpack_options['page-content'] ) ) ) ); ?>
  32. </div>
  33. </article>
  34. <?php endif; ?>
  35. <?php if ( have_posts() ) : ?>
  36. <div class="testimonials">
  37. <?php
  38. while ( have_posts() ) : the_post();
  39. get_template_part( 'components/features/testimonials/content', 'testimonials' );
  40. endwhile;
  41. ?>
  42. </div><!-- .testimonials -->
  43. <?php
  44. the_posts_navigation();
  45. endif;
  46. wp_reset_postdata();
  47. ?>
  48. </main><!-- #main -->
  49. </div><!-- #primary -->
  50. <?php get_sidebar(); ?>
  51. </div><!-- .wrap -->
  52. <?php
  53. get_footer();