-
Notifications
You must be signed in to change notification settings - Fork 2
/
content.php
72 lines (40 loc) · 1.48 KB
/
content.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
64
65
66
67
68
69
70
71
72
<?php
$post_format = get_post_format() ? get_post_format() : 'default';
if ( $post_format == 'default' && has_post_thumbnail() ) : ?>
<figure class="featured-media">
<?php if ( is_sticky() ) : ?><span class="sticky-post"><?php _e( 'Sticky post', 'wilson' ); ?></span><?php endif; ?>
<a href="<?php the_permalink(); ?>">
<?php
the_post_thumbnail();
if ( $image_caption = get_the_post_thumbnail_caption() ) : ?>
<figcaption class="media-caption"><?php echo $image_caption; ?></figcaption>
<?php endif; ?>
</a>
</figure><!-- .featured-media -->
<?php endif; ?>
<div class="post-inner">
<?php if ( in_array( $post_format, array( 'aside', 'quote' ) ) ) : ?>
<div class="post-meta light">
<span class="post-date"><a href="<?php the_permalink(); ?>"><?php the_time( get_option( 'date_format' ) ); ?></a></span>
<?php if ( is_sticky() ) : ?>
<span class="date-sep"> / </span>
<?php _e( 'Sticky', 'wilson' ); ?>
<?php endif; ?>
</div><!-- .post-meta -->
<?php else : ?>
<header class="post-header">
<h2 class="post-title">
<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
</h2>
<?php wilson_meta(); ?>
</header><!-- .post-header -->
<?php endif; ?>
<?php if ( get_the_content() ) : ?>
<div class="post-content">
<?php
the_content();
wp_link_pages();
?>
</div><!-- .post-content -->
<?php endif; ?>
</div><!-- .post-inner -->