-
Notifications
You must be signed in to change notification settings - Fork 14
/
sidebar-frontpage.php
66 lines (47 loc) · 1.89 KB
/
sidebar-frontpage.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
61
62
63
64
65
66
<?php
/**
* The sidebar template containing the front page widget area
*
* @package Reactor
* @subpackge Templates
* @since 1.0.0
*/
?>
<?php // get the front page layout
wp_reset_postdata();
/** @noinspection PhpParamsInspection */
$layout = reactor_option('', '1c', '_template_layout'); ?>
<?php // if front page has one sidebar and the sidebar is active
if (is_active_sidebar('sidebar-frontpage') && '1c' != $layout) : ?>
<?php reactor_sidebar_before(); ?>
<div id="sidebar-frontpage" class="sidebar <?php reactor_columns('', true, true, 1); ?>"
role="complementary" data-ng-controller="SidebarFrontpageCtrl">
<widget-sidebar name="sidebar-frontpage"></widget-sidebar>
</div><!-- #sidebar-frontpage -->
<?php // else show an alert
else : if ('1c' != $layout) : ?>
<div id="sidebar-frontpage" class="sidebar <?php reactor_columns('', true, true, 1); ?>"
role="complementary">
<div class="alert-box secondary">
<p>Add some widgets to this area!</p>
</div>
</div><!-- #sidebar -->
<?php reactor_sidebar_after(); ?>
<?php endif; endif; ?>
<?php // if front page has two sidebars and second sidear is active
if (is_active_sidebar('sidebar-frontpage-2') && ('3c-l' == $layout || '3c-r' == $layout || '3c-c' == $layout)) : ?>
<?php reactor_sidebar_before(); ?>
<div id="sidebar-frontpage-2" class="sidebar <?php reactor_columns('', true, true, 2); ?>"
role="complementary" data-ng-controller="SidebarFrontpageCtrl">
<widget-sidebar name="sidebar-frontpage-2"></widget-sidebar>
</div>
<?php // else show an alert
else : if ('3c-l' == $layout || '3c-r' == $layout || '3c-c' == $layout) : ?>
<div id="sidebar-frontpage-2" class="sidebar <?php reactor_columns('', true, true, 2); ?>"
role="complementary">
<div class="alert-box secondary">
<p>Add some widgets to this area!</p>
</div>
</div><!-- #sidebar-2 -->
<?php reactor_sidebar_after(); ?>
<?php endif; endif; ?>