-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
695 lines (534 loc) · 25.7 KB
/
single.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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
<?php
/**
* This file displays your single posts.
*
* @package Podcaster
* @since 1.0
*/
/* Loads the header.php template*/
get_header();
$thst_wp_version = get_bloginfo( 'version' );
$pod_plugin_active = pod_get_plugin_active();
$format = get_post_format();
if( $pod_plugin_active == "ssp" ) {
$format = pod_ssp_get_format( $post->ID );
}
$thump_cap = pod_the_post_thumbnail_caption();
$featured_post_header = get_post_meta( $post->ID, 'cmb_thst_feature_post_img', true );
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), '' );
$header_img = ! empty( $image[0] ) ? $image[0] : '';
$posttype = get_post_type();
$pod_blog_layout = pod_theme_option('pod-blog-layout', 'sidebar-right');
$gallerystyle_global = pod_theme_option('pod-pofo-gallery', 'slideshow_on');
$pod_sticky_header = pod_theme_option('pod-sticky-header', false);
$pod_single_header_display = pod_theme_option('pod-single-header-display', 'has-thumbnail');
$pod_single_header_thumb_embed = pod_theme_option('pod-single-header-thumbnail-audio-embed', true);
$pod_single_header_thumb_playlist = pod_theme_option('pod-single-header-thumbnail-audio-playlist', true);
$pod_header_thumb_size = pod_theme_option('pod-single-header-thumbnail-size', 'thumb-size-small');
$pod_header_thumb_radius = pod_theme_option('pod-single-header-thumbnail-radius', 'straight-corners');
$pod_single_header_par = pod_theme_option('pod-single-header-par', false);
$pod_single_header_bgstyle = pod_theme_option( 'pod-single-bg-style', 'background-repeat:repeat;' );
$pod_header_par = pod_theme_option( 'pod-single-header-par', false );
$pod_single_video_bg = pod_theme_option('pod-single-video-bg', false);
$pod_players_preload = pod_theme_option('pod-players-preload', 'none');
/* Player position */
$pod_single_audio_player_position = pod_theme_option( 'pod-single-header-player-display', 'player-in-header' );
$pod_ssp_meta = pod_theme_option('pod-ssp-meta-data', false);
$has_thumb = ( has_post_thumbnail() && $pod_single_header_display ) == 'has-thumbnail' ? ' with_thumbnail' : '';
$ssp_single_sticky = $pod_sticky_header == true ? 'sticky' : '';
$pod_single_header_bg = (has_post_thumbnail() && $pod_single_header_display == 'has-background' && $format == 'audio') ? 'thumb_bg' : '';
$ssp_single_header_bg = (has_post_thumbnail() && $pod_single_header_display == 'has-background' && $posttype == 'podcast') ? 'thumb_bg' : '';
$pod_single_bg_img = (has_post_thumbnail() && $pod_single_header_display == 'has-background') ? 'background-image: url(' . $header_img . ');' : '';
$ssp_single_thumb_style = (has_post_thumbnail() && $pod_single_header_display == 'has-thumbnail') ? ' with_thumbnail' : '';
$bpp_single_sticky = $pod_sticky_header == true ? 'sticky' : '';
$bpp_single_header_bg = (has_post_thumbnail() && $pod_single_header_display == 'has-background' && $format == 'audio') ? 'thumb_bg' : '';
$bpp_single_bg_img = (has_post_thumbnail() && $pod_single_header_display == 'has-background') ? 'background-image: url(' . $header_img . ');' : '';
$bpp_single_thumb_style = (has_post_thumbnail() && $pod_single_header_display == 'has-thumbnail') ? ' with_thumbnail' : '';
$audiotype = get_post_meta( $post->ID, 'cmb_thst_audio_type', true );
$audiourl = get_post_meta( $post->ID, 'cmb_thst_audio_url', true );
$audioembed = get_post_meta( $post->ID, 'cmb_thst_audio_embed', true );
$audioembedcode = get_post_meta( $post->ID, 'cmb_thst_audio_embed_code', true );
$audiocapt = get_post_meta($post->ID, 'cmb_thst_audio_capt', true );
$audioplists = get_post_meta( $post->ID, 'cmb_thst_audio_playlist', true );
$audioex = get_post_meta( $post->ID, 'cmb_thst_audio_explicit', true );
$videotype = get_post_meta( $post->ID, 'cmb_thst_video_type', true );
$videoembed = get_post_meta( $post->ID, 'cmb_thst_video_embed', true);
$videourl = get_post_meta( $post->ID, 'cmb_thst_video_url', true);
$videocapt = get_post_meta($post->ID, 'cmb_thst_video_capt', true);
$videothumb = get_post_meta($post->ID, 'cmb_thst_video_thumb',true);
$videoplists = get_post_meta( $post->ID, 'cmb_thst_video_playlist', true );
$videoembedcode = get_post_meta( $post->ID, 'cmb_thst_video_embed_code', true );
$videoex = get_post_meta( $post->ID, 'cmb_thst_video_explicit', true );
$gallerystyle = get_post_meta( $post->ID, 'cmb_thst_post_gallery_style', true );
$galleryimgs = get_post_meta( $post->ID, 'cmb_thst_gallery_list', true );
$gallerycapt = get_post_meta($post->ID, 'cmb_thst_gallery_capt', true);
$gallerycol = get_post_meta($post->ID, 'cmb_thst_gallery_col', true);
$pod_sc_player = pod_theme_option('pod-audio-soundcloud-player-style', 'sc-classic-player');
$mediatype = '';
if( $format == "audio" ) {
$mediatype = $audiotype;
} elseif( $format == "video" ) {
$mediatype == $videotype;
}
if( $audiotype == "audio-embed-url" || $audiotype == "audio-embed-code" ) {
$has_thumb_embed = ( $pod_single_header_thumb_embed ) ? "audio-embed-thumbnail-active" : "audio-embed-thumbnail-inactive" ;
} else {
$has_thumb_embed = "";
}
if( $audiotype == "audio-playlist" ) {
$has_thumb_playlist = ( $pod_single_header_thumb_playlist ) ? "audio-playlist-thumbnail-active" : "audio-playlist-thumbnail-inactive";
} else {
$has_thumb_playlist = "";
}
/* Check for sidebars */
$pod_is_sidebar_active = is_active_sidebar( 'sidebar_single' ) ? "pod-is-sidebar-active" : "pod-is-sidebar-inactive";
?>
<?php
/* If the post has the post type podcast, or has either audio/video/image as a postformat. */
if( $format == 'audio' || $format == 'video' || $format == 'image' ) { ?>
<?php if( has_post_thumbnail() && $pod_single_video_bg == true && $format == 'video' ) { ?>
<div class="single-featured <?php echo pod_is_nav_transparent(); ?> <?php echo pod_audio_format_featured_image( $post->ID ); ?> <?php echo pod_has_featured_image($post->ID); ?> <?php echo 'format-' . $format; ?>">
<?php echo pod_header_parallax( $post->ID ); ?>
<div class="background translucent">
<?php } elseif( has_post_thumbnail() && $pod_single_header_display == "has-background" && ( $format == 'audio' ) ) { ?>
<div class="single-featured <?php echo pod_is_nav_transparent(); ?> <?php echo pod_audio_format_featured_image( $post->ID ); ?> <?php echo pod_has_featured_image($post->ID); ?> <?php echo 'format-' . $format; ?> <?php echo esc_attr( $mediatype ); ?>">
<?php echo pod_header_parallax( $post->ID ); ?>
<div class="background translucent">
<?php } else { ?>
<div style="<?php echo esc_attr( $pod_single_header_bgstyle ); ?>" class="single-featured <?php echo esc_attr( $pod_header_thumb_size ); ?> <?php echo pod_is_nav_transparent(); ?> <?php echo esc_attr( $pod_header_thumb_radius ); ?> <?php echo pod_has_featured_image($post->ID); ?> <?php echo pod_audio_format_featured_image( $post->ID ); ?> <?php echo 'format-' . $format; ?> <?php echo esc_attr( $mediatype ); ?>">
<div class="background translucent">
<?php } ?>
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="single-featured-<?php echo esc_attr( $format ); ?>-container">
<?php if( $pod_plugin_active == "ssp" ) {
global $ss_podcasting, $wp_query;
$id = get_the_ID();
$output_s_ssp_a = '';
$file = get_post_meta( $id , "enclosure", true );
$audio_file = get_post_meta( $id, "audio_file", true );
$file = $audio_file ? $audio_file : $file;
$audiotype = "audio-url";
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $id ), 'large' );
$ep_explicit = get_post_meta( get_the_ID() , 'explicit' , true );
if( $ep_explicit && $ep_explicit == 'on' ) {
$explicit_flag = 'Yes';
} else {
$explicit_flag = 'No';
}
?>
<?php if( $format == "audio" ) { ?>
<?php if( has_post_thumbnail() && $pod_single_header_display == 'has-thumbnail' ) { ?>
<div class="album-art">
<?php echo get_the_post_thumbnail($id, 'square-large'); ?>
</div>
<?php } ?>
<?php } ?>
<?php if( $format == "audio" || $format == "video" ){ ?>
<?php if( $format == "audio" ) { ?>
<div class="player_container <?php echo esc_attr( $ssp_single_thumb_style ); ?> <?php echo esc_attr( $audiotype ); ?>">
<span class="mini-title">
<?php echo get_the_date(); ?> •
<?php echo pod_get_ssp_series_cats($post->ID, '', '', ', ', true); ?>
</span>
<h2>
<?php echo get_the_title(); ?>
<?php if( $explicit_flag == 'Yes' ) { ?>
<span class="mini-ex">
<?php echo __('Explicit', 'podcaster'); ?>
</span>
<?php } ?>
</h2>
<?php if( $file != '' ){
echo '<div class="audio">';
echo pod_get_featured_player( $post->ID );
echo '</div><!-- .audio -->';
} ?>
</div><!-- player_container -->
<?php } elseif( $format == "video" ) { ?>
<?php if( $file != '' ){
$featured_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
$featured_image_url = $featured_image[0];
echo pod_get_featured_player( $post->ID );
} ?>
<?php } ?>
<?php } ?>
<?php } elseif( $pod_plugin_active == "bpp" ) { ?>
<?php $bpp_settings = get_option('powerpress_general');
$bpp_disable_appearance = isset( $bpp_settings['disable_appearance'] ) ? $bpp_settings['disable_appearance'] : '';
/* PowerPress Files*/
$pp_audio_str = get_post_meta( $post->ID, 'enclosure', true );
$pp_audiourl = strtok($pp_audio_str, "\n");
?>
<?php if( $format == "audio" ) {
$audiotype = "audio-url"; ?>
<?php if( has_post_thumbnail() && $pod_single_header_display == 'has-thumbnail' ) { ?>
<div class="album-art">
<?php echo get_the_post_thumbnail($id, 'square-large'); ?>
</div>
<?php } ?>
<div class="player_container audio-container <?php echo esc_attr( $bpp_single_thumb_style ); ?> <?php echo esc_attr( $audiotype ); ?>">
<span class="mini-title"><?php echo get_the_date(); ?></span>
<h2><?php echo get_the_title(); ?></h2>
<?php if( $bpp_disable_appearance != true ) { ?>
<?php echo pod_get_featured_player( $post->ID ); ?>
<?php } ?>
</div><!-- player_container -->
<?php } elseif( $format == "video" ) { ?>
<?php echo pod_get_featured_player( $post->ID ); ?>
<?php } ?>
<?php } else { ?>
<?php if( $format == "audio" ) { ?>
<?php if( has_post_thumbnail() && $pod_single_header_display == 'has-thumbnail' ) { ?>
<?php if( ( $audiotype == "audio-embed-url" || $audiotype == "audio-embed-code" ) && $pod_single_header_thumb_embed == true ) { ?>
<div class="album-art">
<?php echo get_the_post_thumbnail($id, 'square-large'); ?>
</div>
<?php } elseif( ( $audiotype == "audio-playlist" ) && $pod_single_header_thumb_playlist == true ) { ?>
<div class="album-art">
<?php echo get_the_post_thumbnail($id, 'square-large'); ?>
</div>
<?php } elseif( $audiotype == "audio-url" ) { ?>
<div class="album-art">
<?php echo get_the_post_thumbnail($id, 'square-large'); ?>
</div>
<?php } ?>
<?php } ?>
<div class="player_container <?php echo esc_attr( $has_thumb ); ?> <?php echo esc_attr( $has_thumb_embed ); ?> <?php echo esc_attr( $has_thumb_playlist ); ?> <?php echo esc_attr( $audiotype ); ?>">
<div class="player_container_text">
<span class="mini-title"><?php echo get_the_date(); ?></span>
<h2>
<?php echo get_the_title(); ?>
<?php if( $audioex == 'on' ) { ?>
<span class="mini-ex">
<?php echo __('Explicit', 'podcaster'); ?>
</span>
<?php } ?>
</h2>
</div>
<div class="audio">
<?php echo pod_get_featured_player( $post->ID ); ?>
</div><!-- audio -->
</div><!-- player_container -->
<?php } elseif( $format == "video" ) { ?>
<?php echo pod_get_featured_player( $post->ID ); ?>
<?php } ?>
<?php } ?>
<?php if( $format == 'image') { ?>
<div class="image">
<?php echo get_the_post_thumbnail( $post->ID,'regular-large' ); ?>
</div><!-- .image -->
<?php } ?>
</div><!-- single-featured-container -->
</div><!-- col -->
</div><!-- row -->
</div><!-- container -->
<?php if( has_post_thumbnail() && $pod_single_header_display == 'background' && $posttype == 'podcast' ) { ?>
</div>
<?php } elseif( has_post_thumbnail() && $pod_single_header_display == 'background' && ( $format == 'audio' || ( $format == 'video' && $pod_single_video_bg == true) ) ) { ?>
</div>
<?php } else { ?>
</div>
<?php } ?>
</div><!-- single-featured -->
<?php } elseif( $format == 'gallery' ){ ?>
<?php if ( $galleryimgs != '' ) { ?>
<div class="featured-gallery">
<?php if ( $gallerystyle == "slideshow" ) { ?>
<div class="gallery flexslider">
<ul class="slides">
<?php foreach ($galleryimgs as $galleryimgsKey => $galleryimg) {
$imgid = $galleryimgsKey; ?>
<li>
<?php echo wp_get_attachment_image( $imgid, 'regular-large' ); ?>
</li>
<?php } ?>
</ul>
</div><!-- gallery.flexslider -->
<?php } else { ?>
<div class="gallery grid clearfix <?php echo esc_attr( $gallerycol ); ?>">
<?php foreach ( $galleryimgs as $galleryimgsKey => $galleryimg ) {
$imgid = $galleryimgsKey; ?>
<div class="gallery-item">
<a href="<?php echo esc_attr( $galleryimg ); ?>" data-lightbox="lightbox">
<?php echo wp_get_attachment_image( $imgid, 'square-large' ); ?>
</a>
</div>
<?php } ?>
</div><!-- gallery.grid -->
<?php } ?>
</div>
<?php } ?>
<?php } ?>
<?php if( $pod_plugin_active == 'bpp' && ( $format == 'audio' || $format == 'video' ) ) : ?>
<?php
$bpp_settings = get_option('powerpress_general');
$bpp_settings_feeds = isset( $bpp_settings['custom_feeds'] ) ? $bpp_settings['custom_feeds'] : '';
$bpp_disable_appearance = isset( $bpp_settings[ 'disable_appearance' ] ) ? $bpp_settings[ 'disable_appearance' ] : '';
$bpp_disable_player = isset( $bpp_settings['disable_player'] ) ? $bpp_settings['disable_player'] : '';
$bpp_ep_data = powerpress_get_enclosure_data( $post->ID, 'podcast' );
$bpp_ep_data_url = ! empty( $bpp_ep_data['url'] ) ? $bpp_ep_data['url'] : '';
$bpp_media_url = powerpress_add_flag_to_redirect_url( $bpp_ep_data_url, 'p' );
$bpp_subscribe_links = powerpressplayer_link_subscribe_pre( ' ', $bpp_media_url, $bpp_ep_data );
if( $bpp_disable_appearance != true ) { ?>
<?php $bpp_ep_data = powerpress_get_enclosure_data(get_the_ID(), 'podcast'); ?>
<?php if( ! empty( $bpp_settings_feeds) ) {
$array_default_feed = array( "podcast" => "Podcast" );
$bpp_settings_feeds = array_merge( $array_default_feed, $bpp_settings_feeds );
?>
<?php foreach ( $bpp_settings_feeds as $key => $feed ) {
if ( ! empty($bpp_settings_feeds) ) {
$bpp_ep_data_custom_feed = powerpress_get_enclosure_data(get_the_ID(), $key );
$bpp_ep_feed = $bpp_ep_data_custom_feed['feed'];
if ( array_key_exists($bpp_ep_feed, $bpp_disable_player ) ) {
$bpp_feed_custom_player_active = $bpp_disable_player[$bpp_ep_feed];
} else {
$bpp_feed_custom_player_active = false;
}
if( $bpp_ep_data_custom_feed != false && $bpp_feed_custom_player_active != true ){
$bpp_media_url = powerpress_add_flag_to_redirect_url( $bpp_ep_data_custom_feed['url'], 'p' );
$bpp_new_wind_link = powerpressplayer_link_pinw( '', $bpp_media_url, $bpp_ep_data_custom_feed );
$bpp_download_link = powerpressplayer_link_download( '', $bpp_media_url, $bpp_ep_data_custom_feed );
$bpp_embed_link = powerpressplayer_link_embed( '', $bpp_media_url, $bpp_ep_data_custom_feed );
?>
<div class="caption-container format-<?php echo esc_attr( $format ); ?>">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div>
<div class="featured audio">
<?php if( $bpp_ep_data_custom_feed != false && ( $bpp_new_wind_link !='' || $bpp_download_link != '' || $bpp_embed_link != '' ) ) : ?>
<p class="powerpress_embed_box" style="display: block;">
<?php echo __('Podcast', 'podcaster') . ': '; ?>
<?php
if ( !empty( $bpp_new_wind_link ) ) {
echo powerpressplayer_link_pinw( '', $bpp_media_url, $bpp_ep_data_custom_feed );
if( !empty( $bpp_download_link ) || !empty( $bpp_embed_link ) ) {
echo ' | ';
}
}
if ( !empty( $bpp_download_link ) ) {
echo powerpressplayer_link_download( '', $bpp_media_url, $bpp_ep_data_custom_feed );
if( !empty( $bpp_new_wind_link) || !empty( $bpp_embed_link ) ) {
echo ' | ';
}
}
if ( !empty( $bpp_embed_link ) ) {
echo powerpressplayer_link_embed( '', $bpp_media_url, $bpp_ep_data_custom_feed );
}
?>
<?php if( $bpp_settings['subscribe_links'] == true ) { ?>
<span>
<?php echo __('Subscribe', 'podcaster') . ': '; ?>
<?php echo powerpressplayer_link_subscribe_pre( ' ', $bpp_media_url, $bpp_ep_data ); ?>
</span>
<?php } ?>
</p>
<?php endif; ?>
</div>
</div><!-- next-week -->
</div><!-- col -->
</div><!-- row -->
</div><!-- container -->
</div><!-- caption-container -->
<?php }
}
} ?>
<?php } else {
$bpp_ep_data_url = ! empty( $bpp_ep_data['url'] ) ? $bpp_ep_data['url'] : '';
$bpp_media_url = powerpress_add_flag_to_redirect_url($bpp_ep_data_url, 'p');
$bpp_new_wind_link = powerpressplayer_link_pinw('', $bpp_media_url, $bpp_ep_data );
$bpp_download_link = powerpressplayer_link_download('', $bpp_media_url, $bpp_ep_data );
$bpp_embed_link = powerpressplayer_link_embed('', $bpp_media_url, $bpp_ep_data );
?>
<?php if( $bpp_ep_data != false && ( $bpp_new_wind_link !='' || $bpp_download_link != '' || $bpp_embed_link != '' ) ) : ?>
<div class="caption-container format-<?php echo esc_attr( $format ); ?>">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div>
<div class="featured audio">
<p class="powerpress_embed_box" style="display: block;">
<?php echo __('Podcast', 'podcaster') . ': '; ?>
<?php
if ( !empty( $bpp_new_wind_link ) ) {
echo powerpressplayer_link_pinw('', $bpp_media_url, $bpp_ep_data );
if( !empty( $bpp_download_link ) || !empty( $bpp_embed_link ) ) {
echo ' | ';
}
}
if ( !empty( $bpp_download_link ) ) {
echo powerpressplayer_link_download('', $bpp_media_url, $bpp_ep_data );
if( !empty( $bpp_new_wind_link) || !empty( $bpp_embed_link ) ) {
echo ' | ';
}
}
if ( !empty( $bpp_embed_link ) ) {
echo powerpressplayer_link_embed('', $bpp_media_url, $bpp_ep_data );
}
?>
</p>
</div>
</div><!-- next-week -->
</div><!-- col -->
</div><!-- row -->
</div><!-- container -->
</div><!-- caption-container -->
<?php endif; ?>
<?php } ?>
<?php } ?>
<?php elseif( $pod_plugin_active == 'ssp' && $pod_ssp_meta == true && ( $format == 'audio' || $format == 'video' ) ) :
global $ss_podcasting;
$audio_meta = $ss_podcasting->episode_meta_details( $post->ID ); ?>
<div class="caption-container format-<?php echo esc_attr( $format ); ?>">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div>
<div class="featured audio">
<?php echo wp_kses_post( $audio_meta ); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php else : ?>
<?php if( ( $format == "video" && $videocapt != '' ) || ( $format == "audio" && $audiocapt != '' ) || ( $format == "image" && $thump_cap != '' ) || ( $format == "gallery" && $gallerycapt != '' ) ) : ?>
<div class="caption-container format-<?php echo esc_attr( $format ); ?>">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div>
<?php if ( $format == "video" ) : ?>
<?php echo '<div class="featured vid">' . $videocapt . '</div>'; ?>
<?php endif; ?>
<?php if ( $format == "audio" ) : ?>
<?php echo '<div class="featured audio">' . $audiocapt . '</div>'; ?>
<?php endif; ?>
<?php if ( $format == "image" ) : ?>
<?php echo '<div class="featured img">' . $thump_cap . '</div>'; ?>
<?php endif; ?>
<?php if ( $format == "gallery" ) : ?>
<?php echo '<div class="featured img">' . $gallerycapt . '</div>'; ?>
<?php endif; ?>
</div><!-- next-week -->
</div><!-- col -->
</div><!-- row -->
</div><!-- container -->
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ( ! ($format == "video" || $format == "image" || $format == "audio" || $format == "gallery" || $posttype == "podcast" ) && $pod_sticky_header == TRUE ) : ?>
<div class="main-content single thst-main-posts sticky <?php echo esc_attr( $pod_is_sidebar_active ); ?>">
<?php else : ?>
<div class="main-content single thst-main-posts <?php echo esc_attr( $pod_is_sidebar_active ); ?>">
<?php endif ; ?>
<div class="container">
<div class="row">
<?php if( $pod_blog_layout == 'sidebar-right' ) : /* If sidebar is being displayed on the right. */ ?>
<div class="col-lg-8 col-md-8">
<div class="entry-container content">
<?php
/*The following line creates the main loop.*/
if (have_posts()) :
while (have_posts()) : the_post();
/*This gets the template to display the posts.*/
get_template_part( 'post/format', $format );
?>
<?php pod_set_post_views(get_the_ID()); ?>
<?php
endwhile;
endif;
?>
</div><!-- entry-container -->
</div><!-- col-8 -->
<?php if( is_active_sidebar( 'sidebar_single' ) ) { ?>
<div class="col-lg-4 col-md-4">
<?php
/*This displays the sidebar with help of sidebar.php*/
get_template_part('sidebar');
?>
</div><!-- col-4 -->
<?php } ?>
<?php elseif( $pod_blog_layout == 'sidebar-left' ) : /* If sidebar is being displayed on the left. */ ?>
<div class="col-lg-8 col-md-8 sbar-left pulls-right">
<div class="entry-container content">
<?php
/*The following line creates the main loop.*/
if (have_posts()) :
while (have_posts()) : the_post();
/*This gets the template to display the posts.*/
get_template_part( 'post/format', $format );
?>
<?php pod_set_post_views(get_the_ID()); ?>
<?php
endwhile;
endif;
?>
</div><!-- entry-container-->
</div><!-- col-8 -->
<?php if( is_active_sidebar( 'sidebar_single' ) ) { ?>
<div class="col-lg-4 col-md-4 pulls-left">
<?php
/*This displays the sidebar with help of sidebar.php*/
get_template_part('sidebar');
?>
</div><!-- col-4 -->
<?php } ?>
<?php elseif( $pod_blog_layout == 'no-sidebar' ) : /* If no sidebar is being displayed. */ ?>
<div class="col-lg-12 col-md-12">
<div class="entry-container content">
<?php
/*The following line creates the main loop.*/
if (have_posts()) :
while (have_posts()) : the_post();
/*This gets the template to display the posts.*/
get_template_part( 'post/format', $format );
?>
<?php pod_set_post_views(get_the_ID()); ?>
<?php
endwhile;
endif;
?>
</div><!-- entry-container-->
</div><!-- col-12 -->
<?php else : ?>
<div class="col-lg-8 col-md-8">
<div class="entry-container content">
<?php
/*The following line creates the main loop.*/
if (have_posts()) :
while (have_posts()) : the_post();
/*This gets the template to display the posts.*/
get_template_part( 'post/format', $format );
?>
<?php pod_set_post_views(get_the_ID()); ?>
<?php
endwhile;
endif;
?>
</div><!-- entry-container -->
</div><!-- col-8 -->
<?php if( is_active_sidebar( 'sidebar_single' ) ) { ?>
<div class="col-lg-4 col-md-4">
<?php
/*This displays the sidebar with help of sidebar.php*/
get_template_part('sidebar');
?>
</div><!-- col-4 -->
<?php } ?>
<?php endif; ?>
</div><!-- row -->
</div><!-- container -->
<?php if( $pod_single_audio_player_position == "player-in-footer" ) {
$pod_use_sticky_player = pod_use_single_sticky_audio_player( $post->ID );
if( $pod_use_sticky_player ) {
echo pod_single_sticky_audio_player( $post->ID );
}
} ?>
</div><!-- main-content -->
<?php
/*This displays the footer with help of footer.php*/
get_footer(); ?>