attachment.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * The template for displaying all attachments.
  4. *
  5. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#attachment
  6. *
  7. * @package Shoreditch
  8. */
  9. get_header(); ?>
  10. <div class="site-content-wrapper">
  11. <div id="primary" class="content-area">
  12. <main id="main" class="site-main" role="main">
  13. <?php
  14. while ( have_posts() ) : the_post();
  15. get_template_part( 'template-parts/content', 'attachment' );
  16. // If comments are open or we have at least one comment, load up the comment template.
  17. if ( comments_open() || get_comments_number() ) {
  18. comments_template();
  19. }
  20. // Show a link back to post
  21. the_post_navigation( array(
  22. 'prev_text' => '<span class="meta-nav">' . esc_html__( 'Published in', 'shoreditch' ) . '</span> ' . '<span class="post-title">%title</span>',
  23. ) );
  24. endwhile; // End of the loop.
  25. ?>
  26. </main><!-- #main -->
  27. </div><!-- #primary -->
  28. <?php get_sidebar(); ?>
  29. </div><!-- .site-content-wrapper -->
  30. <?php
  31. get_sidebar( 'footer' );
  32. get_footer();