-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidebar.php
executable file
·54 lines (43 loc) · 1.38 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
<?php
/**
* The sidebar containing the flyout widget area.
*
* @package York Lite
* @author Rich Tabor of ThemeBeans <[email protected]>
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public License
*/
// Add a class if there is no widget area active.
$is_active = ( ! is_active_sidebar( 'sidebar-1' ) ) ? 'no-widget-area' : 'has-widget-area'; ?>
<div id="nav-close" class="nav-close-overlay"></div>
<aside id="secondary" class="sidebar <?php echo esc_attr( $is_active ); ?>">
<div class="hamburger mobile-menu-toggle close-toggle">
<div class="hamburger-box">
<div class="hamburger-inner"></div>
</div>
</div>
<div class="sidebar--section">
<div class="sidebar--section-inner">
<nav id="site-navigation" class="main-navigation nav primary" aria-label="<?php esc_attr_e( 'Primary Menu', 'york-lite' ); ?>">
<?php
wp_nav_menu(
array(
'theme_location' => 'primary',
'menu_class' => 'primary-menu',
'depth' => '0',
'link_before' => '<span>',
'link_after' => '</span>',
'walker' => new YorkClassMobileNavigationWalker(),
)
);
?>
</nav>
</div>
</div>
<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
<div class="sidebar--section widget-area">
<div class="sidebar--section-inner">
<?php dynamic_sidebar( 'sidebar-1' ); ?>
</div>
</div>
<?php endif; ?>
</aside>