-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-now_response.php
50 lines (38 loc) · 1.46 KB
/
content-now_response.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
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if (!is_search()) : ?>
<div class="entry-content now-post">
<p>
<?php if (has_tag('supporter')) : ?>
<span class="now-filmmaker"><?php the_title(); ?></span>,
<?php the_field('supporter_role'); ?>
<?php else : ?>
<?php
$filmmakers = get_the_terms(get_the_ID(), 'filmmaker');
$filmmaker = $filmmakers[0]; // assume only one filmmamer linked to each interview
?>
<span class="now-filmmaker"><?php echo $filmmaker ? get_linked_filmmaker_name($filmmaker) : get_the_title(); ?></span>,
<?php if (get_field('is_curator')) : ?>
<em>curator</em>
<?php elseif($filmmaker) : ?>
<?php the_now_video_list($filmmaker); ?>
<?php endif; ?>
<?php endif; ?>
<?php if (get_field('interview_date')) : ?>
<br><?php echo date('F j, Y', strtotime(get_field('interview_date'))); ?>
<?php endif; ?>
</p>
<?php the_content(); ?>
<?php edit_post_link('Edit this entry »', '<div class="entry-utility">', '</div>'); ?>
</div>
<?php else : ?>
<div class="search-result-type">Where is She Now?</div>
<h2 class="entry-title">
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</h2>
<div class="entry-content">
<?php the_excerpt(); ?>
</div>
<?php endif; ?>
</article>