3 * The template for displaying image attachments
6 * @subpackage Twenty_Fifteen
7 * @since Twenty Fifteen 1.0
12 <div id="primary" class="content-area">
13 <main id="main" class="site-main" role="main">
17 while ( have_posts() ) : the_post();
20 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
22 <nav id="image-navigation" class="navigation image-navigation">
23 <div class="nav-links">
24 <div class="nav-previous"><?php previous_image_link( false, __( 'Previous Image', 'twentyfifteen' ) ); ?></div><div class="nav-next"><?php next_image_link( false, __( 'Next Image', 'twentyfifteen' ) ); ?></div>
25 </div><!-- .nav-links -->
26 </nav><!-- .image-navigation -->
28 <header class="entry-header">
29 <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
30 </header><!-- .entry-header -->
32 <div class="entry-content">
34 <div class="entry-attachment">
37 * Filter the default Twenty Fifteen image attachment size.
39 * @since Twenty Fifteen 1.0
41 * @param string $image_size Image size. Default 'large'.
43 $image_size = apply_filters( 'twentyfifteen_attachment_size', 'large' );
45 echo wp_get_attachment_image( get_the_ID(), $image_size );
48 <?php if ( has_excerpt() ) : ?>
49 <div class="entry-caption">
50 <?php the_excerpt(); ?>
51 </div><!-- .entry-caption -->
54 </div><!-- .entry-attachment -->
59 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
61 'link_before' => '<span>',
62 'link_after' => '</span>',
63 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
64 'separator' => '<span class="screen-reader-text">, </span>',
67 </div><!-- .entry-content -->
69 <footer class="entry-footer">
70 <?php twentyfifteen_entry_meta(); ?>
71 <?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
72 </footer><!-- .entry-footer -->
74 </article><!-- #post-## -->
77 // If comments are open or we have at least one comment, load up the comment template
78 if ( comments_open() || get_comments_number() ) :
82 // Previous/next post navigation.
83 the_post_navigation( array(
84 'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentyfifteen' ),
91 </main><!-- .site-main -->
92 </div><!-- .content-area -->
94 <?php get_footer(); ?>