-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-interviews.php
232 lines (199 loc) · 17.2 KB
/
single-interviews.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
221
222
223
224
225
226
227
228
229
230
231
232
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package Women_Owned_Wineries_Sonoma
*/
get_header();
$title = get_the_title();
$winery = get_field('winery');
$winery_id = $winery->ID;
$vintner = get_field('proprietor', $winery_id);
$date = get_the_date();
$content = get_the_content();
$quote = get_field('quote');
$image = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
$featured_image_caption = get_field('featured_image_caption');
?>
<section class="section feature">
<div class=container>
<div class="tile is-ancestor">
<div class="tile is-vertical is-full">
<div class="tile">
<div class="intro tile is-parent is-vertical">
<article class="tile is-child">
<h1 class="title"><?php echo $title; ?></h1>
<h2 class="title"><?php echo $vintner; ?></h2>
<p class="date">Posted on <?php echo $date; ?></p>
<div class="content">
<?php the_content(); ?>
</div>
</article>
</div>
<div class="tile is-parent">
<article class="tile is-child">
<div class="featured-image">
<figure class="image is-square">
<div class="overlay"></div>
<svg width="676" height="681" viewBox="0 0 676 681" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
<clipPath id="user-space" clipPathUnits="userSpaceOnUse">
<path d="M673.4 354.411C673.9 352.411 674.1 349.011 674 343.911C673.7 333.911 670.6 332.711 671 326.911C671.4 321.111 668.8 308.411 669 302.911C669.1 299.111 666.7 294.311 665.3 290.811C665.3 289.711 665.3 288.511 665.4 287.811L664.7 286.911C664.5 284.711 664.4 283.011 664.4 281.611C664.4 280.311 664.5 279.211 664.6 278.411C664.8 276.711 665 275.511 664.8 273.211C664.7 273.211 664.6 273.411 664.5 273.511L664.8 274.011C664.6 274.511 664.4 274.311 664.2 273.811C663.9 274.011 663.6 273.611 663.2 271.211L663.4 271.611C662.4 268.011 661.2 261.611 660.5 258.911L661.7 258.511C661.2 257.811 660.7 256.511 660.2 254.911C659.7 253.311 659.1 251.311 658.5 249.011C657.3 244.511 656 238.911 654.5 233.311C651.5 222.111 647.9 210.611 646.1 206.511C643.7 197.611 637.1 188.311 632.3 177.911C628.1 169.911 627.2 167.711 627.1 166.511C627 165.211 627.5 164.911 625.5 160.711C620 150.611 625.5 163.411 623 159.611C621.1 155.411 619 151.311 616.9 147.211C621.5 153.711 619.7 149.811 619.3 148.311C616 143.311 612 136.711 608.1 131.211C604.2 125.711 600.4 121.411 598.3 120.811C593.4 114.311 590.9 111.011 589.2 108.711C587.5 106.311 586.4 104.911 584 102.411C585.4 104.311 588.3 107.911 588 108.311C584.2 102.911 585.6 106.311 587.3 108.311C583.5 105.111 575.1 95.4111 566.7 87.1111C562.5 82.9111 558.4 79.0111 555.1 76.2111C551.8 73.4111 549.4 71.7111 548.5 71.9111L548.8 71.5111C545.8 71.7111 547.5 75.4111 541.4 72.1111C540.4 71.0111 539.3 69.8111 538.3 68.7111C536.3 67.6111 534.3 66.5111 532.2 65.4111C528.8 62.3111 530.9 63.1111 531.1 62.9111C526.2 60.1111 520.7 56.4111 514.8 52.6111C508.9 48.8111 502.7 44.9111 496.7 41.6111C500.1 45.4111 503.5 49.3111 506.7 53.2111C502.1 49.8111 495.6 45.2111 489.7 41.7111C483.8 38.2111 478.7 35.6111 477.3 36.0111C475.5 34.5111 473.6 33.0111 471.8 31.6111C466.9 28.6111 463.4 26.8111 460.9 25.8111C458.4 24.8111 456.8 24.5111 455.6 24.4111C453.2 24.2111 452.4 25.0111 448.2 23.0111C444.8 21.1111 441.3 19.3111 437.8 17.6111C441.5 18.7111 445.1 19.9111 448.7 21.2111C443.4 18.8111 439.7 17.3111 436.2 15.8111C432.7 14.3111 429.5 12.9111 425.2 11.1111H425.1C425.7 11.3111 426.1 11.5111 426.1 11.7111L424.5 11.3111C422.9 11.9111 416.9 11.1111 408.8 9.41111C403 8.41111 397.9 7.91111 391.9 7.21111C385.9 6.51111 379.1 5.61111 370 4.01111L365.3 5.71111C360.7 5.11111 356.2 4.51111 351.6 4.01111V2.41111C358.4 2.61111 368.1 2.81111 378.4 3.61111C388.7 4.31111 399.5 5.71111 408.2 7.31111L408.6 6.61111C398.3 4.61111 386.4 3.91111 379.5 3.21111C376.6 2.61111 369.7 0.811111 372.4 0.0111111C370.8 0.311111 369.1 0.611111 367.5 0.911111C358.8 0.411111 352.3 0.411111 346.9 0.311111C341.5 0.311111 337.2 0.211111 332.8 0.211111C328.4 0.111111 323.9 0.111111 318.3 0.0111111C312.7 0.0111111 305.8 -0.0888889 296.6 0.311111L299.8 0.811111C292.6 1.81111 285.4 3.21111 283.2 2.31111C277.8 2.81111 272.2 3.71111 266.7 4.81111C261.3 5.91111 256 7.01111 251 8.11111C240.9 10.4111 231.9 12.8111 224.8 14.4111C224 15.4111 223.3 16.3111 222.5 17.3111C218.1 18.8111 210.6 18.9111 209.6 22.2111C206.7 23.8111 203.8 25.3111 200.9 27.0111C198 28.2111 195.8 29.6111 193.5 30.8111C191.1 32.1111 188.7 33.3111 185.2 34.5111C184.8 34.6111 184.3 34.8111 183.9 34.9111C183.9 35.0111 184 35.0111 184 35.0111C177.4 38.0111 177.7 38.4111 177.7 38.9111C177.7 39.4111 177.4 39.8111 170 43.5111C164.8 45.1111 166.2 48.5111 159.3 52.4111C156.6 53.1111 153.8 53.8111 151.1 54.6111C144.7 58.0111 141.4 60.8111 137.6 64.2111C133.8 67.6111 129.6 71.7111 121.6 78.5111C113.3 84.3111 108.2 86.1111 111.8 80.0111C109.2 84.0111 108.7 85.0111 107.8 86.2111C106.9 87.4111 105.6 88.6111 101.6 93.3111C99.5 93.9111 100.3 92.8111 101.6 90.3111C97.3 93.7111 96.2 95.1111 95.6 96.3111C94.9 97.5111 94.6 98.6111 91.7 101.611C91.5 104.711 91.8 108.711 90.2 110.811L92.8 108.911C90.3 112.411 87.6 116.011 84.7 119.611C81.8 123.211 78.6 126.811 75.2 130.511L74.7 129.611C72.6 132.511 70.6 135.511 68.7 138.511L67.3 138.311C64.4 142.611 61.7 146.911 59.1 151.211L60.5 149.611C59.6 151.111 57.7 154.511 55.5 158.111C53.4 161.711 51 165.711 49.1 168.411L48.6 167.911C43.1 175.611 39.3 183.411 35.9 191.611C32.5 199.811 29.2 208.611 25.2 218.811L25 215.611C22.9 218.811 23.2 219.511 23.5 220.411C23.8 221.311 24.1 222.311 22.2 226.411L20.4 226.211C19.7 234.411 16.4 235.711 13.9 240.711C14.9 240.111 15.9 239.511 16.8 238.911C15.6 242.111 14.4 245.411 13.2 248.711C11.3 254.111 10.2 255.711 9.4 255.611C8.6 255.511 8.2 253.811 7.9 252.811C7.8 255.511 7.7 258.211 7.7 260.911L5.4 262.011C5.9 265.111 5.5 266.511 4.9 268.411C4.3 270.311 3.4 272.711 3.2 277.811C2.3 278.511 2.3 275.911 1.4 279.211C1.4 284.911 1.6 290.511 2 296.011C1.9 292.711 1.9 289.311 2 286.011L4.7 287.611C5.1 292.911 4.7 296.311 4.1 299.311C3.5 302.411 2.9 305.111 3 308.711C2.8 307.011 2.7 305.311 2.5 303.611C2.4 309.611 2.1 312.711 1.6 315.211C1.2 317.711 0.6 319.511 0.2 322.811C0.8 320.711 1.7 317.611 1.9 322.411C1.9 325.911 0.8 324.311 0.4 327.611C1.4 328.011 2 330.411 2.4 333.511C2.6 335.111 2.7 336.911 2.7 338.811C2.7 340.711 2.6 342.711 2.4 344.611C2.1 344.511 1.8 344.311 1.7 343.811C2.1 345.811 2.6 346.811 2.2 350.311L0 348.311C0.7 350.511 1.5 352.711 2.3 354.911C1.8 359.511 3.9 365.811 2.4 365.311L1.8 362.811C2.4 374.011 3.6 385.211 5.3 396.311L3.7 397.111C5.2 398.511 5.7 403.111 6.4 407.111C7.1 411.111 7.7 414.511 9.1 413.611C9 416.911 10.6 422.711 11.9 427.511C13.1 432.211 14 435.911 11.9 434.511C14.6 445.111 17.8 453.111 21.3 461.611C24.9 470.111 28.7 479.211 34.1 491.811C34.9 496.711 38.5 504.911 43.4 513.611C48.2 522.311 54.2 531.511 59 538.811C64.1 545.711 69 551.711 74 557.311C79 563.011 84 568.111 89.1 573.011C99.4 582.711 110.2 591.811 123.5 602.111C125.2 604.111 127 606.011 129.1 608.011C131.2 610.011 133.5 611.911 135.9 613.811C140.8 617.611 146.2 621.211 151.9 624.711C163.1 631.611 175 637.611 184.4 643.711C186.5 644.211 188.5 644.611 190.6 645.111C202.7 653.811 223.9 660.511 243.2 669.311C248.3 670.311 251 670.811 252.2 671.111C251.3 670.811 250 670.011 249.8 669.011C252.6 670.211 257 671.411 260.5 672.411C264.1 673.411 266.8 674.311 266.1 675.211L264.5 675.011C263.8 675.911 268.4 676.711 274 677.511C279.6 678.311 286 678.911 289.2 680.211L285.8 677.611C289.5 678.211 293.3 678.811 297 679.311L293.9 679.411C306.1 679.511 316.5 679.611 326.1 679.611C335.6 679.711 344 680.011 352.6 680.111C361.1 680.211 369.6 680.211 378.9 679.411C388.1 678.611 398.1 677.111 409.2 673.911C406.4 675.611 408.6 674.911 411.6 674.011C414.6 673.111 418.4 672.011 419 673.211C425.1 673.411 430.4 671.811 435.2 669.711C440 667.611 444.2 664.911 448.5 662.911C448.5 662.811 448.5 662.611 449 662.211C454.2 660.411 459.3 658.511 464.4 656.511C460.5 659.911 463 658.111 465.5 656.311C468 654.411 470.6 652.511 467 655.511C477 651.911 487.5 647.311 498.1 642.211C508.8 637.111 519.9 631.211 530.8 624.411C536.3 621.011 541.7 617.411 547.1 613.511C549.8 611.611 552.4 609.511 555 607.511C557.6 605.411 560 603.411 562.5 601.311C572.4 592.911 581.7 584.111 590.5 575.311L588.4 576.311C592.8 571.811 597.4 566.411 601.7 561.311C603.9 558.711 605.9 556.311 607.9 554.011C608.9 552.911 609.9 551.811 610.8 550.711C611.7 549.711 612.7 548.711 613.5 547.811C617 544.311 619.6 539.611 621.5 535.411C623.4 531.211 624.7 527.511 625.6 525.911C627.7 521.111 630.5 516.911 632.5 514.511C634 512.611 635.1 511.711 634.9 512.311C639.6 502.611 641.8 492.311 649.2 479.511C651.5 477.711 655.4 468.011 658.6 458.611C661.9 449.211 664.3 440.211 665.9 440.511L665.7 440.311C670 431.311 672.3 421.611 674 411.811C675.3 404.511 674.3 392.111 675.6 384.511C675.6 376.111 674.8 365.611 673.4 354.411ZM664.2 287.911C664.1 287.611 664.1 287.211 664.1 287.011C664.2 287.311 664.2 287.611 664.2 287.911Z" fill="#202020" />
</clipPath>
</defs>
<image width="100%" height="100%" preserveAspectRatio="xMinYMin slice" xlink:href="<?php echo $image; ?>" clip-path="url(#user-space)" />
</svg>
</figure>
<?php if ($featured_image_caption) : ?>
<small class="has-text-centered"><?php echo $featured_image_caption; ?></small>
<?php endif; ?>
</div>
</article>
</div>
</div>
</div>
</div>
<?php if (have_rows('segment')) : while (have_rows('segment')) : the_row();
$title = get_sub_field('title');
$title_format = get_sub_field('title_format');
$content = get_sub_field('content');
$photo = get_sub_field('photo');
$photo_caption = get_sub_field('photo_caption');
$block_quote = get_sub_field('block_quote');
$counter++; ?>
<?php if ($block_quote) : ?>
<div class="block-quote columns">
<div class="column is-full">
<h2><?php echo $block_quote; ?></h2>
</div>
</div>
<?php endif; ?>
<?php if ($photo || $title || $content) : ?>
<div class="segment columns is-multiline">
<div class="column is-half">
<div class="segment-title <?php echo ($title_format == 'question') ? 'has-text-right' : 'has-text-left'; ?>">
<p class="has-text-weight-bold"><?php echo $title; ?></p>
</div>
<div>
<div class="answer content">
<?php echo $content; ?>
</div>
</div>
</div>
<?php if ($photo) : ?>
<div class="figure column is-one-quarter">
<div class="sticky">
<figure id="modal_<?php echo $counter; ?>" class="expander image">
<img src="<?php echo $photo; ?>" alt="">
</figure>
<?php if ($photo_caption) : ?>
<small><?php echo $photo_caption; ?></small>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endwhile; ?>
<?php endif;
$counter = 0; ?>
<div class="columns">
<div class="column is-one-third">
<?php
$title = get_the_title($winery_id);
$proprietor = get_field('proprietor', $winery_id);
$ownership = get_field('ownerrship', $winery_id);
$wben = get_field('wben_certified', $winery_id);
$street = get_field('street', $winery_id);
$city = get_field('city', $winery_id);
$state = get_field('state', $winery_id);
$zip = get_field('zip', $winery_id);
$phone = get_field('phone_number', $winery_id);
$website = get_field('website', $winery_id);
$logo = wp_get_attachment_url(get_post_thumbnail_id($winery_id));
if ($winery_id) : ?>
<div class="winery card">
<a href="<?php the_permalink(); ?>">
<div class="card-image">
<figure class="image is-4by3">
<img class="" alt="image for <?php the_title(); ?>" title="<?php the_title(); ?>" src="<?php echo $logo; ?>">
</figure>
</div>
</a>
<div class="card-content">
<a href="<?php the_permalink(); ?>" class="media">
<div class="media-content">
<?php if ($wben) : ?>
<span class="icon verified is-medium">
<span class="fa-stack fa-sm">
<i class="fas fa-certificate fa-stack-2x has-text-info"></i>
<i class="fas fa-check fa-stack-1x has-text-white"></i>
<p class="has-text-info">WBENC</p>
</span>
</span>
<?php endif; ?>
<h3 class="title is-5"><?php echo $title; ?></h3>
<?php echo ($proprietor) ? '<p class="subtitle is-5">' . $proprietor . '</p>' : ''; ?>
</div>
</a>
<div class="content">
<ul class="address">
<?php
if ($street && $city && $state) {
echo '<li>';
echo '<span class="icon"><i class="fas fa-map-marker-alt"></i></span>';
echo ($street) ? '<span>' . $street . '</span><br>' : '';
echo ($city) ? '<span>' . $city . '</span>' : '';
echo ($state) ? '<span>' . $state['value'] . '</span>' : '';
echo ($zip) ? '<span>' . $zip . '</span>' : '';
echo '</li>';
} elseif ($city && $state) {
echo '<li>';
echo '<span class="icon"><i class="fas fa-map-marker-alt"></i></span>';
echo ($street) ? '<span>' . $street . '</span><br>' : '';
echo ($city) ? '<span>' . $city . '</span>' : '';
echo ($state) ? '<span>' . $state['value'] . '</span>' : '';
echo ($zip) ? '<span>' . $zip . '</span>' : '';
echo '</li>';
}
?>
</ul>
</div>
</div>
<footer class="card-footer">
<?php echo ($phone) ? '<a class="card-footer-item" href="tel:' . sanitize_phone($phone) . '"><span class="icon"><i class="fas fa-phone"></i></span>' . sanitize_phone($phone) . '<a/>' : ''; ?>
<?php echo ($website) ? '<a class="card-footer-item" href="' . $website . '" target=_blank><span class="icon"><i class="fas fa-globe"></i></span>Visit website</a>' : ''; ?>
</footer>
</div>
<?php endif; ?>
</div>
</div>
</div>
</section>
<?php
get_footer(); ?>
<?php if (have_rows('segment')) : while (have_rows('segment')) : the_row();
$title = get_sub_field('title');
$title_format = get_sub_field('title_format');
$content = get_sub_field('content');
$photo = get_sub_field('photo');
$photo_caption = get_sub_field('photo_caption');
$block_quote = get_sub_field('block_quote');
$counter++;
?>
<div class="modal expanded-image modal_<?php echo $counter; ?>">
<div class="modal-background"></div>
<div class="modal-content">
<figure class="image">
<img src="<?php echo $photo; ?>" alt="<?php echo $photo_caption; ?>">
</figure>
<div class="content">
<?php echo $photo_caption; ?>
</div>
</div>
<button class="modal-close is-large" aria-label="close"></button>
</div>
<?php endwhile;
endif; ?>