-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtemplate-default.php
56 lines (45 loc) · 1.91 KB
/
template-default.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
<?php
// Sidebar Settings
$sidebar_layout = get_post_meta($post->ID, '_sidebar_layout', true);
$sidebar_layout = $sidebar_layout ? $sidebar_layout[0] : 'no-sidebar';
$sidebar_choice = get_post_meta($post->ID, '_sidebar_choice', true);
// Other Options
$other_options = get_post_meta($post->ID, '_page_options',true);
if ($sidebar_layout == 'no-sidebar'){
$content_post_class = '';
} else if ($sidebar_layout == 'left'){
$content_post_class = 'right';
$sidebar_post_class = 'left';
} else if ($sidebar_layout == 'right'){
$content_post_class = 'left';
$sidebar_post_class = 'right';
}
// Page Widgets
$widget_layout = get_post_meta($post->ID, '_widget_layout', true);
$widget_layout = $widget_layout ? $widget_layout[0] : 'no-widgets';
if (isset($widget_layout) && $widget_layout != 'no-widgets'){
$content_post_class .= ' has-widgets';
}
?>
<section id="main">
<div class="shell shell-inner-page"<?php if ($widget_layout != 'no-widgets'){ ?> style="padding-bottom:0;"<?php } ?>>
<div class="container clearfix <?php echo $content_post_class; ?>">
<section id="content" <?php post_class($content_post_class); ?>>
<article class="entry">
<section>
<?php if (isset($other_options) && is_array($other_options) && !in_array('hide_breadcrumbs',$other_options) || !isset($other_options) || !is_array($other_options)): js_breadcrumbs($post->ID); endif; ?>
<?php if (isset($other_options) && is_array($other_options) && !in_array('hide_title',$other_options) || !isset($other_options) || !is_array($other_options)): ?><h1><?php the_title(); ?></h1><?php endif; ?>
<?php the_content(); ?>
<?php comments_template(); ?>
</section>
</article>
</section>
<?php if ($sidebar_layout != 'no-sidebar'){ ?>
<aside class="<?php echo $sidebar_post_class; ?>">
<?php dynamic_sidebar($sidebar_choice); ?>
</aside>
<div class="cl"></div>
<?php } ?>
</div>
</div>
</section>