-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent.php
66 lines (53 loc) · 1.92 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
<section class="content">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if (!is_search()) : ?>
<h1 class="page-title">
<?php the_title(); ?>
</h1>
<?php if (get_post_type() == 'event') : ?>
<ul class="entry-meta events-meta">
<li>
<?php the_event_date() ?>
<?php if ($venue = get_field('event_venue')) : ?>
| <?php echo $venue; ?>
<?php endif; ?>
</li>
<?php if ($city = get_field('event_city')) : ?>
<li><?php echo $city; ?></li>
<?php endif; ?>
</ul>
<?php endif; ?>
<div class="entry-content">
<?php the_content(); ?>
<?php if (get_field('photoset')) : ?>
<div class="entry-photoset" data-photoset-link="<?php the_field('photoset'); ?>"></div>
<?php endif; ?>
<?php $videos = get_field('videos'); ?>
<?php if ($videos) : ?>
<?php foreach( $videos as $post): ?>
<?php setup_postdata($post); ?>
<?php get_template_part('content', 'video'); ?>
<?php endforeach; ?>
<?php wp_reset_postdata(); ?>
<?php endif; ?>
<?php edit_post_link('Edit this entry »', '<div class="entry-utility">', '</div>'); ?>
</div>
<?php else: ?>
<div class="search-result-type">
<?php if (in_array(get_post_type(), array('event', 'filmmaker'))) : ?>
<?php echo ucwords(get_post_type()); ?>
<?php elseif (in_array(get_post_type(), array('chainletter', 'costar'))) : ?>
<?php echo ucwords(get_post_type()); ?> Tape
<?php endif; ?>
</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><!-- #post-## -->
</section>