archive-jetpack-testimonial.php 1.3 KB

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