-
Notifications
You must be signed in to change notification settings - Fork 3
/
image.php
63 lines (54 loc) · 2.2 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
54
55
56
57
58
59
60
61
62
63
<?php
/**
* The template for rendering images and attached images.
*
* @package Archetype
* @version 1.0
* @since 1.0
*/
?>
<?php get_header(); ?>
<div id="wrapper">
<div class="container">
<div class="row">
<div id="main" class="col-md-12 fullwidth" role="main">
<?php if ( have_posts() ) { ?>
<?php while ( have_posts() ) { ?>
<?php the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class( 'post format-standard' ); ?>>
<div class="post-header clearfix">
<div class="title-wrap">
<h1 class="post-title entry-title"><?php the_title(); ?></h1>
<div class="post-header-meta">
<?php if( strlen( trim( get_the_title() ) ) == 0 ) { ?>
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf( esc_attr__( 'Permalink to %s', 'archetype' ), the_title_attribute( 'echo=0' ) ); ?>"><span class="the-time updated"><?php the_time( get_option( 'date_format' ) ); ?></span></a>
<?php } else { ?>
<span class="the-time updated"><?php the_time( get_option( 'date_format' ) ); ?></span>
<?php } // end if/else ?>
</div><!-- /.post-header-meta -->
</div><!-- /.title-wrap -->
</div> <!-- /.post-header -->
<div id="content-<?php the_ID(); ?>" class="entry-content">
<div class="content">
<?php $image_attributes = wp_get_attachment_image_src( $attachment_id, 'large' ); ?>
<img src="<?php echo esc_url( $image_attributes[0] ); ?>" width="<?php echo $image_attributes[1]; ?>" height="<?php echo $image_attributes[2]; ?>" />
</div><!-- ./content -->
<div id="image-thumbnails" class="clearfix">
<div class="fl">
<?php previous_image_link(); ?>
</div>
<div class="fr">
<?php next_image_link(); ?>
</div>
</div><!-- /#image-thumbmails -->
</div><!-- /.entry-content -->
</div> <!-- /#post -->
<?php comments_template( '', true ); ?>
<?php get_template_part( 'pagination' ); ?>
<?php } // end while ?>
<?php } // end if ?>
</div><!-- /#main -->
</div><!-- /.row -->
</div><!-- /.container -->
</div><!-- /#wrapper -->
<?php get_footer(); ?>