forked from mtomas7/tiny-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidebar.php
34 lines (23 loc) · 1018 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
<?php
/**
* The sidebar containing the main widget area
*
* If no active widgets are in the sidebar, hide it completely.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Tiny_Framework
* @since Tiny Framework 1.0
*/
?>
<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
<?php tha_sidebars_before(); // custom action hook ?>
<?php // Accessibility. Aria labelledby adds relationship between the sidebar and its heading. ?>
<aside id="secondary" class="sidebar widget-area" aria-labelledby="sidebar-header" itemscope="itemscope" itemtype="https://schema.org/WPSideBar">
<h2 class="screen-reader-text" id="sidebar-header"><?php esc_html_e( 'Main Sidebar', 'tiny-framework' ); ?></h2>
<?php tha_sidebar_top(); // custom action hook ?>
<?php dynamic_sidebar( 'sidebar-1' ); ?>
<?php tha_sidebar_bottom(); // custom action hook ?>
</aside><!-- #secondary -->
<?php tha_sidebars_after(); // custom action hook ?>
<?php endif; ?>