-
Notifications
You must be signed in to change notification settings - Fork 0
/
writespace-new.php
executable file
·220 lines (152 loc) · 8.18 KB
/
writespace-new.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<?php
/*
Template Name Posts: Write Space New and Improved
*/
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title><?php wp_title(); ?></title>
<link rel="profile" href="http://gmgp.org/xfn/11" />
<link href='http://fonts.googleapis.com/css?family=PT+Serif:400,700,400italic,700italic|Nothing+You+Could+Do' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="<?php bloginfo( 'template_directory' ); ?>/css/writespace-new.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php bloginfo( 'template_directory' ); ?>/css/skeleton.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php bloginfo( 'template_directory' ); ?>/css/layout.css" type="text/css" media="screen" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="<?php bloginfo( 'template_directory' ); ?>/css/ie7.css" type="text/css" media="screen" />
<![endif]-->
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); ?>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-19092842-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body <?php body_class(''); ?>>
<div class="skylark-banner">
<div class="container container-sixteen">
<p class="twelve columns offset-by-two"><a href="http://www.meaganspooner.com/write-space/">In Search of the Write Space"</a> is an ongoing author spotlight at <a href="http://meaganspooner.com">MEAGANSPOONER.COM</a></p>
</div>
</div>
<div class="content">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="spotlight">
<div class="container">
<h1>In Search of the<br />Write Space:<br /><span class="name"><?php the_field('author-name'); ?></span></h1>
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail();
} ?>
</div>
</div>
<article class="post container container-sixteen">
<div class="fourteen columns offset-by-one">
<div class="intro">
<?php
$author_photo = get_field('author-photo');
$social_top['website'] = get_field('website-top');
$social_top['goodreads'] = get_field('goodreads-top');
$social_top['facebook'] = get_field('facebook-top');
$social_top['twitter'] = get_field('twitter-top');
?>
<img src="<?php echo $author_photo['url']; ?>" class="author-photo" alt="<?php echo $author_photo['caption']; ?>">
<?php the_field('author-bio'); ?>
<p class="social">
<?php
foreach ($social_top as $site => $url) {
if ($url) {
echo '<a href="' . $url . '" target="_blank" class="' . $site . '">' . ucwords($site) . '</a> ';
}
}
?>
</p>
</div>
<div class="meg">
<h2>A Note From Meg</h2>
<?php the_field('meg'); ?>
</div>
<div class="tour">
<h2>The Tour</h2>
<?php
for ($i = 1; $i <= 6; $i++) {
if($tour_image = get_field('tour-' . $i . '-image')) {
echo '<div class="stop">';
echo '<a href="' . $tour_image['url'] . '"><img src="' . $tour_image['url'] . '" alt="' . $tour_image['caption'] . '"></a>';
if(get_field('tour-' . $i . '-caption')) {
the_field('tour-' . $i . '-caption');
}
echo '</div>';
} elseif($tour_video = get_field('video_' . $i)) {
echo '<div class="stop">';
echo '<div class="video-container">';
echo $tour_video;
echo '</div>';
if(get_field('tour-' . $i . '-caption')) {
the_field('tour-' . $i . '-caption');
}
echo '</div>';
} else {
break;
}
}
?>
</div>
<div class="book">
<?php
$book_cover = get_field('book-cover');
$social_bottom['website'] = get_field('website-bottom');
$social_bottom['goodreads'] = get_field('goodreads-bottom');
$social_bottom['facebook'] = get_field('facebook-bottom');
$social_bottom['twitter'] = get_field('twitter-bottom');
?>
<h3><span class="title"><?php the_field('book-title'); ?></span><br>by <?php the_field('author-name'); ?></h3>
<img src="<?php echo $book_cover['url']; ?>" class="cover" alt="<?php echo $book_cover['caption']; ?>">
<p class="social">
Genre: <?php the_field('genre'); ?><br>
Publisher: <?php the_field('publisher'); ?><br>
Pub Date: <?php the_field('pub-date'); ?><br>
<?php
foreach ($social_bottom as $site => $url) {
if ($url) {
echo '<a href="' . $url . '" target="_blank" class="' . $site . '">' . ucwords($site) . '</a> ';
}
}
?>
</p>
<?php the_field('book-summary'); ?>
<hr>
<?php the_field('rafflecopter'); ?>
</div>
<div class="about">
<p>“In Search of the Write Space” is an ongoing feature at <a href="http://www.meaganspooner.com">meaganspooner.com</a> that showcases authors through the spaces they carve out for creativity. You can find out more about the feature, and see a list of past guests, by clicking <a href="http://www.meaganspooner.com/write-space/">here</a>.</p>
<p>If you or someone you represent would like to participate in “Write Space,” check out my policies and fill out the application form <a href="http://www.meaganspooner.com/tws-policy/">here</a>!</p>
</div>
</div>
</article>
<?php endwhile; else: ?>
<div class="container">
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
</div>
<?php endif; ?>
<section class="comments container container-sixteen">
<div id="email-subscribe">
<p>Are you a fan of "In Search of the Write Space"? <a href="http://feedburner.google.com/fb/a/mailverify?uri=MeaganSpooner&loc=en_US">Subscribe via email</a> and never miss a post!</p>
</div>
<?php comments_template('/writespace-comments.php'); ?>
</section>
</div>
<footer class="container">
<p>© Meagan Spooner 2012</p>
</footer>
</div>
<?php wp_footer(); ?>
</body>
</html>