-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidebar.php
More file actions
39 lines (32 loc) · 1010 Bytes
/
sidebar.php
File metadata and controls
39 lines (32 loc) · 1010 Bytes
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
<?php
if (pipdig_sidebar_check()) {
if (get_theme_mod('disable_responsive')) {
$sm = 'xs';
} else {
$sm = 'sm';
}
if(get_theme_mod('sidebar_position') != 'left') {
$side_col = 'col-'.$sm.'-4';
} else {
$side_col = 'col-'.$sm.'-4 col-'.$sm.'-pull-8';
}
if (is_single() && function_exists('rwmb_meta')) {
$post_sidebar_position = rwmb_meta( 'pipdig_meta_post_sidebar_position' );
if (!empty($post_sidebar_position)) {
switch ($post_sidebar_position) {
case 'sidebar_right':
$side_col = 'col-'.$sm.'-4';
break;
case 'sidebar_left':
$side_col = 'col-'.$sm.'-4 col-'.$sm.'-pull-8';
break;
}
}
}
?>
<div class="<?php echo $side_col; ?> site-sidebar nopin" role="complementary">
<?php if (!dynamic_sidebar('sidebar-1')) { ?>
<?php the_widget('WP_Widget_Categories', '', 'before_title=<h3 class="widget-title">&after_title=</h3>'); ?>
<?php } //endif ?>
</div><!-- .site-sidebar -->
<?php } //endif ?>