forked from PorteAperteSulWeb/pasw2015
-
Notifications
You must be signed in to change notification settings - Fork 0
/
home-widgets.php
103 lines (86 loc) · 2.93 KB
/
home-widgets.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!-- High Calculus -->
<?php $sidebars_widgets = wp_get_sidebars_widgets();
$i1=0; $i2=0;
if ( is_active_sidebar('sidebar-3') ) { $i1++; }
if ( is_active_sidebar('sidebar-4') ) { $i1++; }
if ( is_active_sidebar('sidebar-5') ) { $i1++; }
switch ($i1) {
case 0:
$width_sottohome = '0%';
break;
case 1:
$width_sottohome = '96%';
break;
case 2:
$width_sottohome = '46%';
break;
case 3:
$width_sottohome = '30%';
break;
}
if ( is_active_sidebar('sidebar-6') ) { $i2++; }
if ( is_active_sidebar('sidebar-7') ) { $i2++; }
if ( is_active_sidebar('sidebar-8') ) { $i2++; }
switch ($i2) {
case 0:
$width_home = '0%';
break;
case 1:
$width_home = '96%';
break;
case 2:
$width_home = '46%';
break;
case 3:
$width_home = '30%';
break;
}
?>
<div class="stickyc">
<?php if (is_active_sidebar('sidebar-6')) { ?>
<div class="stickyc-col" style="width: <?php echo $width_home; if ($i2 > 1) { echo '; border-right: 1px dotted #25385D'; } ?>;">
<ul>
<?php dynamic_sidebar("sidebar-6"); ?>
</ul>
</div>
<?php } ?>
<?php if (is_active_sidebar('sidebar-7')) { ?>
<div class="stickyc-col" style="width: <?php echo $width_home; if ($i2 == 3) { echo '; border-right: 1px dotted #25385D'; } ?>;">
<ul>
<?php dynamic_sidebar("sidebar-7"); ?>
</ul>
</div>
<?php } ?>
<?php if (is_active_sidebar('sidebar-8')) { ?>
<div class="stickyc-col" style="width: <?php echo $width_home;?>;">
<ul>
<?php dynamic_sidebar("sidebar-8"); ?>
</ul>
</div>
<?php } ?>
<div class="clear"></div>
</div>
<!-- Widget "sottohome$"-->
<div id="sotto-hp">
<?php if (is_active_sidebar('sidebar-3')) { ?>
<div class="col-com2" style="width: <?php echo $width_sottohome;?>;">
<ul>
<?php dynamic_sidebar("sidebar-3"); ?>
</ul>
</div>
<?php } ?>
<?php if (is_active_sidebar('sidebar-4')) { ?>
<div class="col-com2" style="width: <?php echo $width_sottohome;?>;">
<ul>
<?php dynamic_sidebar("sidebar-4"); ?>
</ul>
</div>
<?php } ?>
<?php if (is_active_sidebar('sidebar-5')) { ?>
<div class="col-com2" style="width: <?php echo $width_sottohome;?>;">
<ul>
<?php dynamic_sidebar("sidebar-5"); ?>
</ul>
</div>
<?php } ?>
</div>