-
Notifications
You must be signed in to change notification settings - Fork 35
/
sidebar.php
executable file
·58 lines (55 loc) · 1.78 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
<?php
$blaskan_options = get_option('blaskan_options');
if ( $blaskan_options['custom_sidebars_in_pages'] == 1 ) {
$custom_sidebars_in_pages = TRUE;
} else {
$custom_sidebars_in_pages = FALSE;
}
?>
<?php if ( BLASKAN_SIDEBARS == 'no_sidebar' ): ?>
<?php return; ?>
<?php elseif ( BLASKAN_SIDEBARS == 'one_sidebar' ): ?>
<?php if ( $custom_sidebars_in_pages && is_page() ): ?>
<?php if ( is_active_sidebar( 'primary-page-sidebar' ) ) : ?>
<aside id="primary" role="complementary">
<?php dynamic_sidebar( 'primary-page-sidebar' ); ?>
</aside>
<!-- / #primary -->
<?php endif; ?>
<?php else: ?>
<?php if ( is_active_sidebar( 'primary-sidebar' ) ) : ?>
<aside id="primary" role="complementary">
<?php dynamic_sidebar( 'primary-sidebar' ); ?>
</aside>
<!-- / #primary -->
<?php endif; ?>
<?php endif;?>
<?php else: ?>
<?php if ( $custom_sidebars_in_pages && is_page() ): ?>
<?php if ( is_active_sidebar( 'primary-page-sidebar' ) ) : ?>
<aside id="primary" role="complementary">
<?php dynamic_sidebar( 'primary-page-sidebar' ); ?>
</aside>
<!-- / #primary -->
<?php endif; ?>
<?php if ( is_active_sidebar( 'secondary-page-sidebar' ) ) : ?>
<aside id="secondary" role="complementary">
<?php dynamic_sidebar( 'secondary-page-sidebar' ); ?>
</aside>
<!-- / #secondary -->
<?php endif; ?>
<?php else: ?>
<?php if ( is_active_sidebar( 'primary-sidebar' ) ) : ?>
<aside id="primary" role="complementary">
<?php dynamic_sidebar( 'primary-sidebar' ); ?>
</aside>
<!-- / #primary -->
<?php endif; ?>
<?php if ( is_active_sidebar( 'secondary-sidebar' ) ) : ?>
<aside id="secondary" role="complementary">
<?php dynamic_sidebar( 'secondary-sidebar' ); ?>
</aside>
<!-- / #secondary -->
<?php endif; ?>
<?php endif;?>
<?php endif; ?>