author | ymh <ymh.work@gmail.com> |
Mon, 14 Oct 2019 17:39:30 +0200 | |
changeset 7 | cf61fcea0001 |
parent 0 | d970ebf37754 |
permissions | -rw-r--r-- |
0 | 1 |
<?php |
2 |
/** |
|
3 |
* The sidebar containing the front page widget areas |
|
4 |
* |
|
5 |
* If no active widgets are in either sidebar, hide them completely. |
|
6 |
* |
|
7 |
* @package WordPress |
|
8 |
* @subpackage Twenty_Twelve |
|
9 |
* @since Twenty Twelve 1.0 |
|
10 |
*/ |
|
11 |
||
12 |
/* |
|
13 |
* The front page widget area is triggered if any of the areas |
|
14 |
* have widgets. So let's check that first. |
|
15 |
* |
|
16 |
* If none of the sidebars have widgets, then let's bail early. |
|
17 |
*/ |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
18 |
if ( ! is_active_sidebar( 'sidebar-2' ) && ! is_active_sidebar( 'sidebar-3' ) ) { |
0 | 19 |
return; |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
20 |
} |
0 | 21 |
|
22 |
// If we get this far, we have widgets. Let do this. |
|
23 |
?> |
|
24 |
<div id="secondary" class="widget-area" role="complementary"> |
|
25 |
<?php if ( is_active_sidebar( 'sidebar-2' ) ) : ?> |
|
26 |
<div class="first front-widgets"> |
|
27 |
<?php dynamic_sidebar( 'sidebar-2' ); ?> |
|
28 |
</div><!-- .first --> |
|
29 |
<?php endif; ?> |
|
30 |
||
31 |
<?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?> |
|
32 |
<div class="second front-widgets"> |
|
33 |
<?php dynamic_sidebar( 'sidebar-3' ); ?> |
|
34 |
</div><!-- .second --> |
|
35 |
<?php endif; ?> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
36 |
</div><!-- #secondary --> |