-
Notifications
You must be signed in to change notification settings - Fork 0
/
image.php
56 lines (38 loc) · 1.33 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
<?php get_header(); ?>
<div id="primary" class="image-attachment">
<div id="content" role="main">
<?php while (have_posts()): the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php $md = wp_get_attachment_metadata(); ?>
<!-- Date. -->
<span>Published</span>
<span class="entry-date"><?php echo get_the_date(); ?></span>
<!-- Size. -->
<span>at</span>
<a href="<?php echo wp_get_attachment_url(); ?>">
<?php echo $md['width']; ?> x <?php echo $md['height']; ?>
</a>
<!-- Post. -->
<span>in</span>
<a href="<?php echo get_permalink($post->post_parent); ?>">
<?php echo get_the_title($post->post_parent); ?>
</a>
</div>
</header>
<div class="entry-content">
<div class="entry-attachment">
<div class="attachment">
<!-- Image. -->
<a href="<?php echo wp_get_attachment_url(); ?>">
<?php echo wp_get_attachment_image($post->ID, 1200); ?>
</a>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php get_footer(); ?>