archive-jetpack-testimonial.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * The template for displaying the Testimonials archive page.
  4. *
  5. * @package Shoreditch
  6. */
  7. get_header();
  8. if ( have_posts() ) :
  9. $jetpack_options = get_theme_mod( 'jetpack_testimonials' ); ?>
  10. <?php if ( isset( $jetpack_options['featured-image'] ) && '' != $jetpack_options['featured-image'] ) : ?>
  11. <div class="entry-hero" <?php shoreditch_testimonials_image(); ?>>
  12. <div class="entry-hero-wrapper">
  13. <?php shoreditch_testimonials_title( '<h1 class="entry-title">', '</h1>' ); ?>
  14. </div><!-- .entry-hero-wrapper -->
  15. </div><!-- .entry-hero -->
  16. <?php endif; ?>
  17. <div id="primary" class="content-area">
  18. <main id="main" class="site-main" role="main">
  19. <header class="page-header">
  20. <?php
  21. if ( ! isset( $jetpack_options['featured-image'] ) || '' == $jetpack_options['featured-image'] ) {
  22. shoreditch_testimonials_title( '<h1 class="page-title">', '</h1>' );
  23. }
  24. shoreditch_testimonials_content( '<div class="taxonomy-description">', '</div>' );
  25. ?>
  26. </header><!-- .page-header -->
  27. <div class="hentry-wrapper">
  28. <?php
  29. while ( have_posts() ) : the_post();
  30. get_template_part( 'template-parts/content', 'testimonial' );
  31. endwhile; // End of the loop.
  32. ?>
  33. </div><!-- .hentry-wrapper -->
  34. <?php
  35. the_posts_navigation( array(
  36. 'prev_text' => esc_html__( 'Older testimonials', 'shoreditch' ),
  37. 'next_text' => esc_html__( 'Newer testimonials', 'shoreditch' ),
  38. 'screen_reader_text' => esc_html__( 'Testimonials navigation', 'shoreditch' ),
  39. ) );
  40. ?>
  41. </main><!-- #main -->
  42. </div><!-- #primary -->
  43. <?php
  44. get_sidebar( 'footer' );
  45. get_footer();
  46. else : ?>
  47. <div class="site-content-wrapper">
  48. <div id="primary" class="content-area">
  49. <main id="main" class="site-main" role="main">
  50. <?php get_template_part( 'template-parts/content', 'none' ); ?>
  51. </main><!-- #main -->
  52. </div><!-- #primary -->
  53. <?php get_sidebar(); ?>
  54. </div><!-- .site-content-wrapper -->
  55. <?php
  56. get_sidebar( 'footer' );
  57. get_footer();
  58. endif;