-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
75 lines (66 loc) · 2.28 KB
/
single.php
File metadata and controls
75 lines (66 loc) · 2.28 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
<?php
/**
*
* Single File
*/
defined('ABSPATH') || die('No script kiddies please!');
get_header();
// Dapatkan ID post secara langsung
$the_post_id = get_the_ID();
// Dapatkan nilai dari Carbon Fields
$nbt_post_type = carbon_get_the_post_meta('nbt_post');
// Tentukan class section
$section_class = 'standard'; // Default
if ('video' === $nbt_post_type) {
$section_class = 'video';
} elseif ('gallery' === $nbt_post_type) {
$section_class = 'gallery';
}
?>
<section id="sing" class="standard section section-small <?php echo esc_attr($section_class); ?>">
<div class="inner-section">
<div class="container">
<div class="wrapper">
<div class="left">
<?php
if ('video' === carbon_get_the_post_meta('nbt_post')) {
nbt_video_player();
} elseif ('gallery' === carbon_get_the_post_meta('nbt_post')) {
nbt_gallery_player();
} else {
get_template_part('parts/part-single-meta');
?>
<div class="fim">
<?php
nbt_post_featured_image(get_the_ID(), 'full', false);
?>
</div>
<?php
}
?>
<div id="the-content">
<?php
the_content();
?>
</div>
<?php
if (function_exists('nbto_single_post_options') && true === carbon_get_theme_option('nbto_share_post_enable')) {
get_template_part('components/share-post');
}
?>
</div>
<div id="sidebar-container" class="right">
<?php
if (is_active_sidebar('post-sidebar')) : ?>
<aside id="post-sidebar" class="sidebar">
<?php dynamic_sidebar('post-sidebar'); ?>
</aside>
<?php endif;
?>
</div>
</div>
</div>
</div>
</section>
<?php
get_footer();