-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
134 lines (112 loc) · 5.29 KB
/
single.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?php get_header(); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php if(has_post_thumbnail()) {
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
} ?>
<header
class="<?php if(has_post_thumbnail()) {echo 'has-image';}?>"
style='background-image: url("<?php echo $large_image_url[0] ?>");' title="<?php the_title() ?>">
<div class="hero-content">
<h1 class="post-title"><?php the_title(); ?></h1>
<h2 class="post-subtitle">
<?php
$summary = get_post_meta($post->ID, "subtitle_value", $single = true);
if($summary !== ''){ echo $summary; }
?>
</h2>
</div>
<div class="attribution">
<?php if ( function_exists( 'coauthors_posts_links' ) ) { ?>
<?php foreach( get_coauthors() as $coauthor ) : ?>
<div class="author">
<?php $author_posts_url = get_author_posts_url( $coauthor->ID, $coauthor->user_nicename ); ?>
<a class="avatar-wrapper" href="<?php echo $author_posts_url; ?>"><?php echo get_avatar( $coauthor->user_email, '72' ); ?></a>
<a class="name inverse" rel="author" href="<?php echo $author_posts_url; ?>"><?php echo $coauthor->display_name; ?></a>
</div>
<?php endforeach; ?>
<?php } else { ?>
<a href="<?php echo get_author_posts_url(get_the_author_meta( 'ID' )) ?>"><?php echo get_avatar( get_the_author_meta('user_email'), $size = '64'); ?></a>
By <?php the_author_posts_link();?>
<?php }?>
<div class="metadata"><span>Published</span> <?php the_time('M j, Y'); ?> <span>in</span> <?php the_category(', '); ?></div>
</div>
</header>
<div class="wrapper-content">
<div class="entry formatting">
<?php the_content(); ?>
<?php wp_link_pages(); ?>
<div class="callout-newsletter">
<div class="title-callout">Get the Newsletter</div>
<form class="fieldset" action="https://percolatestudio.us3.list-manage.com/subscribe/post">
<input type="hidden" name="u" value="4eaab348037bea8afae9acd5f">
<input type="hidden" name="id" value="a118b8ae30">
<div class="input-symbol left">
<input name="EMAIL" type="email" size="20" value="" placeholder="Add your email to get the latest news & articles like this">
<span class="icon-email"></span>
</div>
<button type="submit" style="display:none;" name="subscribe" id="mc-embedded-subscribe"></button>
</form>
</div>
</div>
</div>
<?php endwhile; ?>
<?php else : endif; ?>
<section class="section-ancillary">
<div class="byline">
<div class="title-section">Author</div>
<div class="attribution">
<?php if ( function_exists( 'coauthors_posts_links' ) ) { ?>
<?php foreach( get_coauthors() as $coauthor ) : ?>
<div class="author">
<?php $author_posts_url = get_author_posts_url( $coauthor->ID, $coauthor->user_nicename ); ?>
<a class="avatar-wrapper" href="<?php echo $author_posts_url; ?>"><?php echo get_avatar( $coauthor->user_email, '72' ); ?></a>
<div class="meta">
<div class="subtitle-section"><?php echo $coauthor->display_name; ?></div>
<p class="description"><?php echo $coauthor->description; ?></p>
<?php if(get_the_author_meta('twitter', $coauthor->ID) != '') { ?>
<a class="monochrome" target="_blank" href="http://twitter.com/<?php the_author_meta('twitter', $coauthor->ID) ?>">Follow @<?php the_author_meta('twitter', $coauthor->ID) ?></a>
<?php } ?>
<a class="monochrome" rel="author" href="<?php echo $author_posts_url; ?>">View posts</a>
</div>
</div>
<?php endforeach; ?>
<?php } else { ?>
<a href="<?php echo get_author_posts_url(get_the_author_meta( 'ID' )) ?>"><?php echo get_avatar( get_the_author_meta('user_email'), $size = '72'); ?></a>
By <?php the_author_posts_link();?>
<?php }?>
</div>
</div>
<div class="social">
<div class="title-section">Share
<a class="title-section-action monochrome" href="<?php bloginfo('url'); ?>/?feed=mailchimp" target="_blank">Subscribe</a>
</div>
<a data-twitter="button" class="link-social twitter">
<span class="wrapper-count">
<span data-twitter="counter" class="count-social">-</span>
<span class="name-social">Twitter</span>
</span>
</a>
<a data-hackernews="button" class="link-social hackernews">
<span class="wrapper-count">
<span data-hackernews="counter" class="count-social">-</span>
<span class="name-social">Hacker<br>News</span>
</span>
</a>
<!-- More info on FB share -->
<a data-facebook="button" class="link-social facebook">
<span class="wrapper-count">
<span data-facebook="counter" class="count-social">-</span>
<span class="name-social">Facebook</span>
</span>
</a>
</div>
</section>
<?php
wp_reset_query();
global $withcomments;
$withcomments = 1;
comments_template();
?>
<?php include('snip_adjacentposts.php'); ?>
<?php get_footer(); ?>