archive-jetpack-testimonial.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * The template for displaying the Testimonials archive page.
  4. *
  5. * @package Components
  6. */
  7. get_header(); ?>
  8. <?php $jetpack_options = get_theme_mod( 'jetpack_testimonials' ); ?>
  9. <?php if ( isset( $jetpack_options['featured-image'] ) && '' != $jetpack_options['featured-image'] ) : ?>
  10. <div class="components-hero">
  11. <?php echo wp_get_attachment_image( (int)$jetpack_options['featured-image'], 'components-hero' ); ?>
  12. </div><!-- .hero -->
  13. <?php endif; ?>
  14. <?php if ( '' != $jetpack_options['page-content'] ) : // only display if content not empty ?>
  15. <div class="content-wrapper">
  16. <div id="primary" class="content-area">
  17. <main id="main" class="site-main" role="main">
  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', 'textbook' );
  25. ?>
  26. </h1>
  27. </header><!-- .entry-header -->
  28. <article class="hentry">
  29. <div class="entry-content">
  30. <?php echo convert_chars( convert_smilies( wptexturize( wp_kses_post( $jetpack_options['page-content'] ) ) ) ); ?>
  31. </div>
  32. </article>
  33. </main><!-- #main -->
  34. </div><!-- #primary -->
  35. </div><!-- .content-wrapper -->
  36. <?php endif; ?>
  37. <?php if ( have_posts() ) : ?>
  38. <div id="grid-view" class="grid-area">
  39. <div class="grid-wrapper clear">
  40. <?php while ( have_posts() ) : the_post(); ?>
  41. <div class="grid">
  42. <?php get_template_part( 'components/features/testimonials/content', 'testimonials' ); ?>
  43. </div><!-- .grid -->
  44. <?php endwhile; ?>
  45. </div><!-- .grid-wrapper -->
  46. </div><!-- #quaternary -->
  47. <?php the_posts_navigation(); ?>
  48. <?php endif;
  49. wp_reset_postdata(); ?>
  50. <?php get_footer(); ?>