-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidebar.php
60 lines (46 loc) · 1.25 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
<?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) {
exit;
}
/**
* Main Widget Template
*
* @file sidebar.php
*/
/*
* Load the correct sidebar according to the page layout
*/
$layout = responsive_get_layout();
switch ( $layout ) {
case 'sidebar-content-page':
get_sidebar( 'left' );
return;
break;
case 'content-sidebar-half-page':
get_sidebar( 'right-half' );
return;
break;
case 'sidebar-content-half-page':
get_sidebar( 'left-half' );
return;
break;
case 'full-width-page':
return;
break;
}
?>
<?php responsive_widgets_before(); // above widgets container hook ?>
<div id="widgets" class="<?php echo implode( ' ', responsive_get_sidebar_classes() ); ?>">
<?php responsive_widgets(); // above widgets hook ?>
<?php if ( !dynamic_sidebar( 'main-sidebar' ) ) : ?>
<div class="widget-wrapper">
<div class="widget-title"><?php _e( 'In Archive', 'responsive' ); ?></div>
<ul>
<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
</ul>
</div><!-- end of .widget-wrapper -->
<?php endif; //end of main-sidebar ?>
<?php responsive_widgets_end(); // after widgets hook ?>
</div><!-- end of #widgets -->
<?php responsive_widgets_after(); // after widgets container hook ?>