-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.php
55 lines (40 loc) · 1.31 KB
/
archive.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
<?php
/**
* The archive template (used for Community Videos CPT)
*
* @package F1 Telos Tennis
* @author Factor1 Studios
* @since 0.0.1
*/
get_header();
$isType = is_tax('video-type');
$headline = $isType ? 'Community Videos: ' . get_queried_object()->name : 'Community Videos'; ?>
<section class="video-results">
<div class="container">
<div class="row">
<div class="col-12 sm-col-11 sm-col-centered">
<h2><?php echo $headline; ?></h2>
</div>
<?php if( have_posts() ) :
while( have_posts() ) : the_post();
// Video CPT Custom Fields
$link = get_field('video_link'); ?>
<div class="col-4 sm-col-11 sm-col-centered">
<div class="flex-video">
<iframe src="<?php echo $link; ?>" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>
</div>
<h5 class="video-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h5>
</div>
<?php endwhile; ?>
<div class="col-12">
<?php the_posts_pagination( array('mid_size' => 2) ); ?>
</div>
<?php else : ?>
<div class="col-12">
<h5 class="video-title">No results found.</h5>
</div>
<?php endif; ?>
</div>
</div>
</section>
<?php get_footer(); ?>