forked from OpenDevelopmentMekong/wp-odm_theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-story.php
104 lines (92 loc) · 3.04 KB
/
single-story.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
<?php get_header(); ?>
<?php if (have_posts()) : the_post();
$options = get_option('odm_options');
$date_to_show = isset($options['single_page_date']) ? $options['single_page_date'] : "metadata_created";
?>
<article id="content" class="single-post story-content">
<section class="container section-title main-title">
<div class="row">
<?php
if (has_post_thumbnail() ): ?>
<div class="sixteen columns post-title story-header">
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'single-post-thumbnail' ); ?>
<header style="min-height:400px;background: linear-gradient( rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5) ), url('<?php echo $image[0]; ?>')">
<div class="container">
<div class="row">
<div class="eight columns offset-by-four">
<div class="post-title">
<h1><?php the_title(); ?></h1>
</div>
</div>
</div>
<div class="row">
<div class="ten columns offset-by-three">
<p><?php the_excerpt(); ?></p>
</div>
</div>
<div class="row">
<div class="six columns offset-by-five">
<p><?php echo_post_meta(get_post(),array('date','categories','tags'),$date_to_show); ?></p>
</div>
</div>
<!-- <div class="row">
<div class="sixteen columns">
<div class="widget share-widget center post-meta">
<?php odm_get_template('social-share',array(),true); ?>
</div>
</div>
</div> -->
</div>
</header>
</div>
<?php
else: ?>
<div class="twelve columns post-title">
<h1><?php the_title(); ?></h1>
<?php echo_post_meta(get_post()); ?>
</div>
<div class="four columns">
<div class="widget share-widget">
<?php odm_get_template('social-share',array(),true); ?>
</div>
</div>
</div>
</section>
<?php
endif; ?>
<section class="container">
<div class="row">
<div class="sixteen columns">
<?php dynamic_sidebar('story-top'); ?>
</div>
</div>
</section>
<?php
$middle_content = get_post_meta(get_the_ID(), '_full_width_middle_content', true);
if (odm_language_manager()->get_current_language() !== 'en') {
$middle_content = get_post_meta(get_the_ID(), '_full_width_middle_content_localization', true);
}
if($middle_content): ?>
<div style="width: 100%;">
<?php echo "<div class='iframe-visualitation'>".$middle_content."</div>"; ?>
</div>
<?php endif; ?>
<section class="container">
<div class="row">
<div class="fourteen offset-by-one columns">
<?php the_content(); ?>
<?php odm_echo_extras(); ?>
</section>
</div>
</div>
</section>
<section class="container">
<div class="row">
<div class="sixteen columns">
<?php dynamic_sidebar('story-bottom'); ?>
</div>
</div>
</section>
</article>
<?php endif; ?>
<?php get_footer(); ?>