3
* The template for displaying image attachments
6
* @subpackage Twenty_Fourteen
7
* @since Twenty Fourteen 1.0
10
// Retrieve attachment metadata.
11
$metadata = wp_get_attachment_metadata();
16
<section id="primary" class="content-area image-attachment">
17
<div id="content" class="site-content" role="main">
21
while ( have_posts() ) : the_post();
23
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
24
<header class="entry-header">
25
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
27
<div class="entry-meta">
29
<span class="entry-date"><time class="entry-date" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time></span>
31
<span class="full-size-link"><a href="<?php echo esc_url( wp_get_attachment_url() ); ?>"><?php echo $metadata['width']; ?> × <?php echo $metadata['height']; ?></a></span>
33
<span class="parent-post-link"><a href="<?php echo esc_url( get_permalink( $post->post_parent ) ); ?>" rel="gallery"><?php echo get_the_title( $post->post_parent ); ?></a></span>
34
<?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
35
</div><!-- .entry-meta -->
36
</header><!-- .entry-header -->
38
<div class="entry-content">
39
<div class="entry-attachment">
40
<div class="attachment">
41
<?php twentyfourteen_the_attached_image(); ?>
42
</div><!-- .attachment -->
44
<?php if ( has_excerpt() ) : ?>
45
<div class="entry-caption">
46
<?php the_excerpt(); ?>
47
</div><!-- .entry-caption -->
49
</div><!-- .entry-attachment -->
54
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
56
'link_before' => '<span>',
57
'link_after' => '</span>',
60
</div><!-- .entry-content -->
61
</article><!-- #post-## -->
63
<nav id="image-navigation" class="navigation image-navigation">
64
<div class="nav-links">
65
<?php previous_image_link( false, '<div class="previous-image">' . __( 'Previous Image', 'twentyfourteen' ) . '</div>' ); ?>
66
<?php next_image_link( false, '<div class="next-image">' . __( 'Next Image', 'twentyfourteen' ) . '</div>' ); ?>
67
</div><!-- .nav-links -->
68
</nav><!-- #image-navigation -->
70
<?php comments_template(); ?>
72
<?php endwhile; // end of the loop. ?>
74
</div><!-- #content -->
75
</section><!-- #primary -->