forked from anabelle/Foundation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfooter.php
executable file
·67 lines (57 loc) · 1.19 KB
/
footer.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
<?php
/**
* Footer
*
* Displays content shown in the footer section
*
* @package WordPress
* @subpackage Foundation 5, for WordPress
* @since Foundation, for WordPress 4.0
*/
?>
</div>
<!-- End Page -->
<!-- Footer -->
<footer class="row">
<?php
$foundation_sidebars = array('foundation_footer_one','foundation_footer_two','foundation_footer_three','foundation_footer_four');
$count = 0;
/*
Check to see how many columns the footer is required to support
and unset inactive sidebars
*/
foreach($foundation_sidebars as $x=>$sidebar)
{
if(is_active_sidebar($sidebar)) {
$count++;
} else {
unset($foundation_sidebars[$x]);
}
}
/*
Display active sidebars with the approprite column width
The widgets in the sidebars stack in their column
*/
if($count){
$col_width = 12/$count;
foreach($foundation_sidebars as $sidebar)
{
?>
<div id="<?php echo $sidebar;?>" class="large-<?php echo $col_width;?> columns">
<?php dynamic_sidebar($sidebar); ?>
</div>
<?php
}
} else {
?>
<div class="large-12 columns">
<ul class="inline-list">
<?php wp_list_pages('title_li='); ?>
</ul>
</div>
<?php } ?>
</footer>
<!-- End Footer -->
<?php wp_footer(); ?>
</body>
</html>