forked from bigemployee/BigBlankTheme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
image.php
57 lines (57 loc) · 2.63 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
<?php
/**
* The template for displaying image attachments
*
*/
// Retrieve attachment metadata.
$metadata = wp_get_attachment_metadata();
get_header();
get_header('layout');
?>
<?php
// Start the Loop.
while (have_posts()) : the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php schema(); ?>>
<header class="entry-header">
<?php the_title('<h1 class="entry-title" ' . schema('name', false, false) . '>', '</h1>'); ?>
<div class="entry-meta">
<time class="entry-date" datetime="<?php echo esc_attr(get_the_date('c')); ?>"><?php echo esc_html(get_the_date()); ?></time>
<a href="<?php echo wp_get_attachment_url(); ?>" class="full-size-link"><?php echo $metadata['width']; ?> × <?php echo $metadata['height']; ?></a>
<a href="<?php echo get_permalink($post->post_parent); ?>" class="parent-post-link" rel="gallery"><?php echo get_the_title($post->post_parent); ?></a>
<?php edit_post_link(__('Edit', 'bigblank')); ?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<div class="entry-content" <?php schema('mainContentOfPage'); ?>>
<div class="entry-attachment" <?php schema(false, 'ImageObject'); ?>>
<div class="attachment">
<?php bigblank_the_attached_image(); ?>
</div><!-- .attachment -->
<?php if (has_excerpt()) : ?>
<div class="entry-caption" <?php schema('caption'); ?>>
<?php the_excerpt(); ?>
</div><!-- .entry-caption -->
<?php endif; ?>
</div><!-- .entry-attachment -->
<?php
the_content();
wp_link_pages(array(
'before' => '<div class="page-links"><span class="page-links-title">' . __('Pages:', 'bigblank') . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
));
?>
</div><!-- .entry-content -->
</article><!-- #post-## -->
<nav id="image-navigation" class="navigation image-navigation">
<div class="nav-links">
<?php previous_image_link(false, '<span class="previous-image">' . __('Previous Image', 'bigblank') . '</span>'); ?>
<?php next_image_link(false, '<span class="next-image">' . __('Next Image', 'bigblank') . '</span>'); ?>
</div><!-- .nav-links -->
</nav><!-- #image-navigation -->
<?php comments_template(); ?>
<?php endwhile; // end of the loop. ?>
<?php
get_footer('layout');
get_footer();