archive-jetpack-testimonial.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * The template for displaying the Testimonials archive page.
  4. *
  5. * @package Dara
  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="entry-thumbnail">
  11. <?php echo wp_get_attachment_image( (int)$jetpack_options['featured-image'], 'dara-page-thumbnail' ); ?>
  12. </div><!-- .thumbnail -->
  13. <?php endif; ?>
  14. <div class="content-wrapper <?php echo dara_additional_class(); ?>">
  15. <div id="primary" class="content-area testimonials-content-area">
  16. <div id="main" class="site-main testimonials" role="main">
  17. <article class="hentry">
  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', 'dara' );
  25. ?>
  26. </h1>
  27. </header><!-- .entry-header -->
  28. <?php echo convert_chars( convert_smilies( wptexturize( wp_kses_post( $jetpack_options['page-content'] ) ) ) ); ?>
  29. </article><!-- .hentry -->
  30. <div id="testimonials">
  31. <?php if ( have_posts() ) : ?>
  32. <?php while ( have_posts() ) : the_post(); ?>
  33. <?php get_template_part( 'components/testimonials/content', 'testimonial' ); ?>
  34. <?php endwhile; ?>
  35. <?php the_posts_navigation(); ?>
  36. <?php else : ?>
  37. <?php get_template_part( 'components/post/content', 'none' ); ?>
  38. <?php endif; ?>
  39. </div><!-- #testimonials .grid -->
  40. </div><!-- #main -->
  41. </div><!-- #primary -->
  42. <?php get_sidebar(); ?>
  43. </div><!-- .content-wrapper -->
  44. <?php get_footer(); ?>