-
Notifications
You must be signed in to change notification settings - Fork 1
/
image.php
38 lines (33 loc) · 965 Bytes
/
image.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* The template for displaying image attachments
*
* @package WordPress
* @subpackage Nickel
* @since Nickel 1.0
*/
// Retrieve attachment metadata.
$metadata = wp_get_attachment_metadata();
get_header();
$img = wp_get_attachment_image_src( get_post_thumbnail_id(), 'nickel-full-width' );
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-content">
<div id="entry-content-wrapper">
<?php if ( !empty($img) ) {
echo '<img src="'.$img['0'].'" class="single-post-image" alt="Page with image">';
} ?>
<?php the_content(); ?>
</div>
<?php
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'nickel' ) . '</span>',
'after' => '<div class="clearfix"></div></div>',
'link_before' => '<span>',
'link_after' => '</span>',
) );
?>
</div><!-- .entry-content -->
</article><!-- #post-## -->
<?php
get_footer();