-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsidebar.php
39 lines (32 loc) · 821 Bytes
/
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
<?php
/**
* The sidebar containing the main widget area
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package buddyx
*/
namespace BuddyX\Buddyx;
if ( ! buddyx()->is_left_sidebar_active() || ! buddyx()->is_right_sidebar_active() ) {
return;
}
buddyx()->print_styles( 'buddyx-sidebar', 'buddyx-widgets' );
?>
<?php do_action( 'buddyx_sidebar_before' ); ?>
<aside id="secondary" class="primary-sidebar widget-area">
<div class="sticky-sidebar">
<?php
$sidebar = get_theme_mod( 'sidebar_option' );
switch ( $sidebar ) {
case 'left':
buddyx()->display_left_sidebar();
break;
case 'right':
buddyx()->display_right_sidebar();
break;
default:
}
?>
</div>
</aside><!-- #secondary -->
<?php do_action( 'buddyx_sidebar_after' ); ?>