-
Notifications
You must be signed in to change notification settings - Fork 0
/
attachment.php
60 lines (42 loc) · 1.16 KB
/
attachment.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
<?php
/**
* Attachment Page Template.
*
* @package MPH Starter
* @since 0.1.0
*/
get_header();
have_posts();
the_post();
?>
<div class="row">
<section class="primary-content grid-8">
<article <?php post_class( array( 'entry' ) ); ?>>
<?php if ( wp_attachment_is_image( get_the_id() ) ) : ?>
<figure class="entry-thumb full">
<?php echo wp_get_attachment_image( get_the_id(), 'large' ); ?>
</figure>
<?php endif; ?>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
</header>
<?php if ( ! wp_attachment_is_image( get_the_ID() ) ) : ?>
<p class="download-link">
<a href="<?php echo wp_get_attachment_url( get_the_id() ); ?>">
<?php
printf(
__( 'Download %s', 'mtf' ),
basename( wp_get_attachment_url( get_the_id() ) )
);
?>
</a>
</p>
<?php endif; ?>
<div><?php the_content(); ?></div>
</article><!-- / .article -->
</section><!-- / .primary-content -->
<section class="sidebar grid-4" role="complementary">
<?php get_sidebar(); ?>
</section><!-- .secondary-content .widget-area -->
</div>
<?php get_footer(); ?>