-
Notifications
You must be signed in to change notification settings - Fork 13
/
image.php
53 lines (43 loc) · 1.84 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
* The template for displaying image attachments
*
*/
get_header(); ?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<article id="post-<?php the_ID(); ?>" <?php post_class( 'image-attachment' ); ?>>
<div>
<?php get_template_part( 'content', 'header'); ?>
<div class="entry-content">
<div class="entry-attachment">
<div class="attachment">
<?php portfolio_the_attached_image(); ?>
<?php if ( has_excerpt() ) : ?>
<div class="entry-caption">
<?php the_excerpt(); ?>
</div>
<?php endif; ?>
</div><!-- .attachment -->
</div><!-- .entry-attachment -->
<?php if ( ! empty( $post->post_content ) ) : ?>
<div class="entry-description">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'portfolio' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-description -->
<?php endif; ?>
<nav id="image-navigation" class="navigation image-navigation" role="navigation">
<span class="nav-previous"><?php echo previous_image_link( false, __( '<span class="meta-nav">←</span> Previous Image', 'portfolio' ) ); ?></span>
<span class="nav-next"><?php echo next_image_link( false, __( 'Next Image <span class="meta-nav">→</span>', 'portfolio' ) ); ?></span>
<span class="nav-parent">
<?php $permalink = get_permalink($post->post_parent); ?>
<a href="<?php echo $permalink; ?>"><?php _e('↑ Return to post', 'portfolio'); ?></a>
</span>
</nav><!-- #image-navigation -->
<?php get_template_part( 'content', 'footer' ); ?>
</div>
</article><!-- #post -->
<?php comments_template(); ?>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>