-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidebar.php
executable file
·69 lines (47 loc) · 1.4 KB
/
sidebar.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
<?php
/*
Checks to see if there is an individual override of the layout from the page.
If not loads the default, set in General Options, or theme default.
if is a left sidebar, this needs to be output before the content.
*/
GLOBAL $sic_theme;
$position = rwmb_meta('sic_page_layout');
if($position == "default" || $position == ''){
$position = $sic_theme->settings['pages']['layout'];
}
$sidebar = rwmb_meta('sic_page_sidebar');
if($sidebar == ""){$sidebar = 'Default';}
if( $position == 'rsidebar' ){ ?>
<aside id="aside_<?php echo $post->ID;?>" class="aside aside-right">
<div class="inner">
<?php
if(is_home() || is_single() || is_category() || is_archive()){
dynamic_sidebar( 'Main Sidebar' );
}
if(is_page() && $sidebar == 'Default'){
dynamic_sidebar('Main Sidebar');
}
if(is_page() && $sidebar != 'Default'){
generated_dynamic_sidebar_webtreats(TRUE);
}
?>
</div>
</aside>
<?php }
if( $position == 'lsidebar'){?>
<aside id="aside_<?php echo $post->ID; ?>" class="aside aside-left">
<div class="inner">
<?php if(is_home() || is_single()){
dynamic_sidebar( 'Main Sidebar' );
}
if(is_page() && $sidebar == 'Default'){
dynamic_sidebar('Main Sidebar');
}
if(is_page() && $sidebar != 'Default'){
generated_dynamic_sidebar_webtreats(TRUE);
}?>
</div>
</aside>
<?php
}
?>