-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
105 lines (89 loc) · 3.63 KB
/
single.php
File metadata and controls
105 lines (89 loc) · 3.63 KB
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
<?php
/**
* The Template for displaying all single posts.
*
* @package nbr
*/
get_header(); ?>
<div id="primary" class="content-area">
<div id="content" class="site-content width-75 bg-0" role="main">
<?php while ( have_posts() ) : the_post();
$cats = get_the_terms($post->ID, 'category');
foreach ($cats as $cat) {
$cat_term = $cat->slug;
}
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="page-header bg-12">
<h1 class="page-title"><?php if (get_field('feature_related_film')) { ?><em><?php echo(get_field('feature_related_film')); ?></em> – <?php } the_title(); ?></h1>
<div class="entry-meta text-50">
<?php if ($cat_term == 'q-and-a') : ?>
<h6><?php the_date('F j, Y'); ?></h6>
<?php else : ?>
<h6><?php the_date('F Y'); ?></h6>
<?php endif; ?>
<!--
<p>by <?php
if (get_field('feature_author')) { echo( get_field('feature_author') ); }
else { the_author(); }
?></p>
-->
</div>
</header>
<div class="entry-media post">
<?php if( have_rows('feature_slideshow_images') ): ?>
<ul class="post-slides nbr-slider" data-slick='{ "prevArrow": ".slick-nav.prev", "nextArrow": ".slick-nav.next" }'>
<?php while( have_rows('feature_slideshow_images') ) : the_row(); ?>
<li>
<div class="image bg-80">
<div class="image-wrapper">
<img src="<?php the_sub_field('feature_slideshow_image'); ?>" alt="slideshow image"/>
</div>
</div>
<?php
$feature_slideshow_image_caption = get_sub_field('feature_slideshow_image_caption');
if ( $feature_slideshow_image_caption ) : ?>
<div class="caption bg-12"><?php echo $feature_slideshow_image_caption; ?></div>
<?php endif; ?>
</li>
<?php endwhile; ?>
</ul>
<div class="slick-nav-arrows">
<a href="#" class="slick-nav prev">Previous</a>
<a href="#" class="slick-nav next">Next</a>
</div>
<?php endif; ?>
</div>
<div class="entry-content">
<?php the_content(); ?>
<div class="share clear">
<h6>Share</h6>
<div class="share-button-wrap twitter">
<span class="icon">Twitter</span>
<span class="link">
<a href="https://twitter.com/share" class="twitter-share-button" data-lang="en" data-text="<?php echo get_the_title().' @NBRfilm'; ?>">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
</div>
<div class="share-button-wrap facebook">
<span class="icon">Facebook</span>
<span class="link">
<div class="fb-share-button" data-href="<?php echo get_permalink(); ?>" data-type="button_count"></div>
</span>
</div>
<div class="share-button-wrap email">
<?php $title = str_replace(array("&","&"), " and ", get_the_title()); ?>
<a href="mailto:?subject=National%20Board%20of%20Review%20|%20<?php if (get_field('feature_related_film')) { ?><?php echo(get_field('feature_related_film')); ?> – <?php } echo $title; ?>&body=<?php the_permalink(); ?>" class="icon">Email</a>
</div>
</div>
</div>
</article>
<?php endwhile; ?>
</div><!-- #content -->
<div id="secondary" class="widget-area news archives qa width-25" role="complementary">
<?php get_template_part('module-qa'); ?>
<?php get_template_part('module-news'); ?>
<?php get_template_part('module-archives'); ?>
</div>
</div><!-- #primary -->
<?php get_footer(); ?>