2013-07-29 00:55:10 +02:00
< ? php
/**
* The template for displaying image attachments .
*
* @ package WordPress
* @ subpackage Twenty_Fourteen
*/
2013-09-20 20:22:09 +02:00
$metadata = wp_get_attachment_metadata ();
2013-07-29 00:55:10 +02:00
get_header ();
?>
2013-08-15 05:13:29 +02:00
< section id = " primary " class = " content-area image-attachment " >
2013-09-20 20:22:09 +02:00
< div id = " content " class = " site-content " role = " main " >
2013-07-29 00:55:10 +02:00
< ? php while ( have_posts () ) : the_post (); ?>
< article id = " post-<?php the_ID(); ?> " < ? php post_class (); ?> >
< header class = " entry-header " >
2013-08-15 05:13:29 +02:00
< ? php the_title ( '<h1 class="entry-title">' , '</h1>' ); ?>
2013-07-29 00:55:10 +02:00
< div class = " entry-meta " >
< 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>
2013-10-09 21:07:09 +02:00
< span class = " full-size-link " >< a href = " <?php echo wp_get_attachment_url(); ?> " >< ? php echo $metadata [ 'width' ]; ?> × <?php echo $metadata['height']; ?></a></span>
2013-07-29 00:55:10 +02:00
2013-10-09 21:07:09 +02:00
< span class = " parent-post-link " >< a href = " <?php echo get_permalink( $post->post_parent ); ?> " rel = " gallery " >< ? php echo get_the_title ( $post -> post_parent ); ?> </a></span>
2013-07-29 00:55:10 +02:00
< ? php edit_post_link ( __ ( 'Edit' , 'twentyfourteen' ), '<span class="edit-link">' , '</span>' ); ?>
</ div ><!-- . entry - meta -->
</ header ><!-- . entry - header -->
< div class = " entry-content " >
< div class = " entry-attachment " >
< div class = " attachment " >
2013-08-15 05:13:29 +02:00
< ? php twentyfourteen_the_attached_image (); ?>
2013-07-29 00:55:10 +02:00
</ div ><!-- . attachment -->
2013-08-15 05:13:29 +02:00
< ? php if ( has_excerpt () ) : ?>
2013-07-29 00:55:10 +02:00
< div class = " entry-caption " >
< ? php the_excerpt (); ?>
</ div ><!-- . entry - caption -->
< ? php endif ; ?>
</ div ><!-- . entry - attachment -->
< ? php
2013-08-15 05:13:29 +02:00
the_content ();
2013-07-29 00:55:10 +02:00
wp_link_pages ( array (
'before' => '<div class="page-links"><span class="page-links-title">' . __ ( 'Pages:' , 'twentyfourteen' ) . '</span>' ,
'after' => '</div>' ,
'link_before' => '<span>' ,
2013-08-15 05:13:29 +02:00
'link_after' => '</span>' ,
2013-07-29 00:55:10 +02:00
) );
?>
</ div ><!-- . entry - content -->
< footer class = " entry-meta " >
2013-08-15 05:13:29 +02:00
< ? php
if ( comments_open () && pings_open () ) : // Comments and trackbacks open
2013-10-09 21:07:09 +02:00
printf ( __ ( '<a class="comment-link" href="#respond">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" rel="trackback">Trackback URL</a>.' , 'twentyfourteen' ), get_trackback_url () );
2013-08-15 05:13:29 +02:00
elseif ( ! comments_open () && pings_open () ) : // Only trackbacks open
2013-10-09 21:07:09 +02:00
printf ( __ ( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" rel="trackback">Trackback URL</a>.' , 'twentyfourteen' ), get_trackback_url () );
2013-08-15 05:13:29 +02:00
elseif ( comments_open () && ! pings_open () ) : // Only comments open
2013-10-09 21:07:09 +02:00
_e ( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond">post a comment</a>.' , 'twentyfourteen' );
2013-08-15 05:13:29 +02:00
elseif ( ! comments_open () && ! pings_open () ) : // Comments and trackbacks closed
_e ( 'Both comments and trackbacks are currently closed.' , 'twentyfourteen' );
endif ;
?>
2013-07-29 00:55:10 +02:00
</ footer ><!-- . entry - meta -->
2013-08-15 05:13:29 +02:00
</ article ><!-- #post-## -->
2013-07-29 00:55:10 +02:00
2013-08-15 05:13:44 +02:00
< nav id = " image-navigation " class = " navigation image-navigation " >
2013-09-20 20:22:09 +02:00
< div class = " nav-links " >
2013-07-29 00:55:10 +02:00
< ? php previous_image_link ( false , __ ( '<div class="previous-image">Previous Image</div>' , 'twentyfourteen' ) ); ?>
< ? php next_image_link ( false , __ ( '<div class="next-image">Next Image</div>' , 'twentyfourteen' ) ); ?>
2013-09-20 20:22:09 +02:00
</ div ><!-- . nav - links -->
2013-07-29 00:55:10 +02:00
</ nav ><!-- #image-navigation -->
< ? php comments_template (); ?>
< ? php endwhile ; // end of the loop. ?>
2013-08-15 05:13:29 +02:00
</ div ><!-- #content -->
</ section ><!-- #primary -->
2013-07-29 00:55:10 +02:00
2013-08-15 05:13:29 +02:00
< ? php
get_sidebar ();
get_footer ();