2013-07-29 00:55:10 +02:00
|
|
|
<?php
|
|
|
|
/**
|
2013-10-12 00:02:11 +02:00
|
|
|
* The template for displaying image attachments
|
2013-07-29 00:55:10 +02:00
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Twenty_Fourteen
|
2013-10-12 00:02:11 +02:00
|
|
|
* @since Twenty Fourteen 1.0
|
2013-07-29 00:55:10 +02:00
|
|
|
*/
|
|
|
|
|
2013-12-03 18:06:11 +01:00
|
|
|
// Retrieve attachment metadata.
|
2013-09-20 20:22:09 +02:00
|
|
|
$metadata = wp_get_attachment_metadata();
|
|
|
|
|
2013-07-29 00:55:10 +02:00
|
|
|
get_header();
|
|
|
|
?>
|
|
|
|
|
2013-10-30 15:39:10 +01:00
|
|
|
<section id="primary" class="content-area image-attachment">
|
|
|
|
<div id="content" class="site-content" role="main">
|
|
|
|
|
2013-12-03 18:06:11 +01:00
|
|
|
<?php
|
|
|
|
// Start the Loop.
|
2017-12-01 00:11:00 +01:00
|
|
|
while ( have_posts() ) :
|
|
|
|
the_post();
|
2018-08-17 03:51:36 +02:00
|
|
|
?>
|
2017-12-01 00:11:00 +01:00
|
|
|
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
|
|
|
<header class="entry-header">
|
|
|
|
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
|
2013-10-30 15:39:10 +01:00
|
|
|
|
2017-12-01 00:11:00 +01:00
|
|
|
<div class="entry-meta">
|
2013-10-30 15:39:10 +01:00
|
|
|
|
2017-12-01 00:11:00 +01:00
|
|
|
<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-30 15:39:10 +01:00
|
|
|
|
2017-12-01 00:11:00 +01:00
|
|
|
<span class="full-size-link"><a href="<?php echo esc_url( wp_get_attachment_url() ); ?>"><?php echo esc_html( $metadata['width'] ); ?> × <?php echo esc_html( $metadata['height'] ); ?></a></span>
|
2013-10-30 15:39:10 +01:00
|
|
|
|
2017-12-01 00:11:00 +01:00
|
|
|
<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>
|
|
|
|
<?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
|
|
|
|
</div><!-- .entry-meta -->
|
|
|
|
</header><!-- .entry-header -->
|
2013-10-30 15:39:10 +01:00
|
|
|
|
2017-12-01 00:11:00 +01:00
|
|
|
<div class="entry-content">
|
|
|
|
<div class="entry-attachment">
|
|
|
|
<div class="attachment">
|
|
|
|
<?php twentyfourteen_the_attached_image(); ?>
|
|
|
|
</div><!-- .attachment -->
|
2013-10-30 15:39:10 +01:00
|
|
|
|
2017-12-01 00:11:00 +01:00
|
|
|
<?php if ( has_excerpt() ) : ?>
|
2013-10-30 15:39:10 +01:00
|
|
|
<div class="entry-caption">
|
|
|
|
<?php the_excerpt(); ?>
|
|
|
|
</div><!-- .entry-caption -->
|
|
|
|
<?php endif; ?>
|
2017-12-01 00:11:00 +01:00
|
|
|
</div><!-- .entry-attachment -->
|
2013-10-30 15:39:10 +01:00
|
|
|
|
2017-12-01 00:11:00 +01:00
|
|
|
<?php
|
|
|
|
the_content();
|
|
|
|
wp_link_pages(
|
|
|
|
array(
|
2013-10-30 15:39:10 +01:00
|
|
|
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
|
|
|
|
'after' => '</div>',
|
|
|
|
'link_before' => '<span>',
|
|
|
|
'link_after' => '</span>',
|
2017-12-01 00:11:00 +01:00
|
|
|
)
|
|
|
|
);
|
|
|
|
?>
|
2013-10-30 15:39:10 +01:00
|
|
|
</div><!-- .entry-content -->
|
|
|
|
</article><!-- #post-## -->
|
|
|
|
|
|
|
|
<nav id="image-navigation" class="navigation image-navigation">
|
|
|
|
<div class="nav-links">
|
2013-12-03 21:43:10 +01:00
|
|
|
<?php previous_image_link( false, '<div class="previous-image">' . __( 'Previous Image', 'twentyfourteen' ) . '</div>' ); ?>
|
|
|
|
<?php next_image_link( false, '<div class="next-image">' . __( 'Next Image', 'twentyfourteen' ) . '</div>' ); ?>
|
2013-10-30 15:39:10 +01:00
|
|
|
</div><!-- .nav-links -->
|
|
|
|
</nav><!-- #image-navigation -->
|
|
|
|
|
|
|
|
<?php comments_template(); ?>
|
|
|
|
|
|
|
|
<?php endwhile; // end of the loop. ?>
|
|
|
|
|
|
|
|
</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();
|