-
Notifications
You must be signed in to change notification settings - Fork 1
/
single-work.php
executable file
·88 lines (74 loc) · 1.98 KB
/
single-work.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
<?php
/*
* single work
* semplice.theme
*/
?>
<?php get_header(); # inlude header ?>
<?php if ( post_password_required() ) { ?>
<div class="container">
<div class="row">
<div class="span12">
<?php echo get_the_password_form(); ?>
</div>
</div>
</div>
<?php } else { ?>
<?php if(get_field('cover_visibility') === 'visible') : ?>
<?php get_template_part('partials/fullscreen-cover'); ?>
<?php endif; ?>
<!-- content fade -->
<div class="fade-content">
<?php
// Remove wpautop
remove_filter('the_content', 'wpautop');
// get content
$content = get_post_meta( get_the_ID(), 'semplice_ce_content', true );
// output content
$output = apply_filters('the_content', $content);
echo $output;
// reset postdata
wp_reset_postdata();
?>
<script>
(function($) {
$(document).ready(function () {
$("video, audio").mediaelementplayer();
$('[data-is-image-link=true]').each(function(){
var url = $(this).data('image-link');
$(this).wrap('<a target="_blank" href="'+ url + '"></a>');
});
$('.ce-image').each(function(){
$(this).remove();
});
$(".slider").each(function() {
sliderId = $(this).attr('id');
$('#' + sliderId).responsiveSlides({
auto: $(this).data('autoplay'),
pager: false,
nav: true,
speed: 500,
timeout: $(this).data('timeout'),
namespace: 'slider'
});
});
});
})(jQuery);
</script>
</div>
<?php if(get_field('share_visibility') === 'visible') : ?>
<div class="share-box fade-content">
<div class="container">
<?php get_template_part('partials/share'); ?>
</div>
</div>
<?php endif; ?>
<div id="project-panel-footer" class="fade-content">
<?php
// quick nav thumb
$tn_transition = '';
get_template_part('partials/project', 'panel');
?>
</div>
<?php } ?>
<?php get_footer(); # inlude footer ?>