-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-video.php
177 lines (94 loc) · 4.73 KB
/
single-video.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
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package WordPress
* @subpackage studentlifeUOL
* @author Jez Thompson <[email protected]>
* @since 1.0
* @version 1.0
*/
if(has_post_format('video')) {
// download_thumbnail();
}
get_header();
$youtube_link = get_field( 'youtube_link' );
?>
<?php get_template_part( 'template-parts/featured-image' ); ?>
<main id="main" class="site-main">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="site-module">
<div class="module-inner-wrap site-module">
<?php if( $youtube_link ): ?>
<div class="posts-video_embed">
<?php echo $youtube_link; ?>
</div> <!--posts-video_embed-->
<?php endif; ?>
</div>
<div class="module-inner-wrap site-module">
<div class="columns-wrap flex-controlled">
<div class="column-spacings column column--1-of-2 column--medium-1-of-2 column--small-1-of-1 clear ">
<div class="entry-content video-post">
<?php the_content(); ?>
</div> <!--entry-content-->
</div> <!--column-->
<div class="column-spacings column column--1-of-2 column--medium-1-of-2 column--small-1-of-1 clear ">
<?php get_template_part( 'template-parts/meet-author' ); ?>
<?php
if(get_the_tag_list()) {
echo get_the_tag_list('<dl class="tags" ><dt>Tagged:</dt><dd>',', </dd><dd>','</dd></dl>');
}
?>
</div> <!--column-->
</div> <!--columns-wrap-->
<div class="columns-wrap flex-controlled fs-sidebar">
<div class="column-spacings column column--1-of-2 column--medium-1-of-2 column--small-1-of-1 clear ">
<?php
$prevPost = get_previous_post(true);
if($prevPost):
?>
<div class="side-box previous-box">
<h4 class="post-category"><?php list_categories($prevPost->ID); ?></h4>
<?php $prevthumbnail = get_the_post_thumbnail($prevPost->ID, 'post-intro-image-video');?>
<a href="<?php echo get_permalink( $prevPost->ID ); ?>">
<?php echo($prevthumbnail) ?>
</a>
<h3 class="post-title">
<a href="<?php echo get_permalink( $prevPost->ID ); ?>">
<?php echo apply_filters( 'the_title', $prevPost->post_title ); ?>
</a>
</h3>
<p><i class="post-auth"><?php echo get_the_author_meta('display_name', $prevPost->post_author) ?></i></p>
</div>
<?php endif; ?>
</div> <!--column-->
<div class="column-spacings column column--1-of-2 column--medium-1-of-2 column--small-1-of-1 clear ">
<?php
$nextPost = get_next_post(true);
if($nextPost):
?>
<div class="side-box next-box">
<h4 class="post-category"><?php list_categories($nextPost->ID); ?></h4>
<?php $nextthumbnail = get_the_post_thumbnail($nextPost->ID, 'post-intro-image-video');?>
<a href="<?php echo get_permalink( $prevPost->ID ); ?>">
<?php echo($nextthumbnail) ?>
</a>
<h3 class="post-title">
<a href="<?php echo get_permalink( $nextPost->ID ); ?>">
<?php echo apply_filters( 'the_title', $nextPost->post_title ); ?>
</a>
</h3>
<p><i class="post-auth"><?php get_the_author_meta('display_name', $nextPost->post_author) ?></i></p>
</div>
<?php endif; ?>
</div> <!--column-->
</div> <!--columns-wrap-->
</div> <!--module-inner-wrap-->
<?php endwhile; ?>
<?php endif; wp_reset_query(); ?>
</div> <!--content-container-->
</main><!-- #main -->
<?php get_footer(); ?>