-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidebar-footer.php
executable file
·58 lines (49 loc) · 1.83 KB
/
sidebar-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
<?php
/**
* The template for displaying the footer.
*
* @package UnPress
* @since UnPress 1.0
**/
?>
<?php
/* The footer widget area is triggered if any of the areas
* have widgets. So let's check that first.
*
* If none of the sidebars have widgets, then let's bail early.
*/
if ( ! is_active_sidebar( 'footer-sidebar-1' )
&& ! is_active_sidebar( 'footer-sidebar-2' )
&& ! is_active_sidebar( 'footer-sidebar-3' )
)
return;
// If we get this far, we have widgets. Let do this.
if(unpress_footer_sidebar_class()=="col-three"):
$first = "col-md-6"; $second = "col-md-3"; $third = "col-md-3";
elseif(unpress_footer_sidebar_class()=="col-two"):
$first = "col-md-6"; $second = "col-md-6"; $third = "col-md-6";
elseif(unpress_footer_sidebar_class()=="col-one"):
$first = "col-md-12"; $second = "col-md-12"; $third = "col-md-12";
endif;
?>
<div class="footer-1-wrapper">
<div class="container">
<div class="row">
<?php if ( is_active_sidebar( 'footer-sidebar-1' ) ) : ?>
<div id="footer-first" class="<?php echo $first; ?>">
<?php dynamic_sidebar( 'footer-sidebar-1' ); ?>
</div>
<?php endif; ?>
<?php if ( is_active_sidebar( 'footer-sidebar-2' ) ) : ?>
<div id="footer-second" class="<?php echo $second; ?>">
<?php dynamic_sidebar( 'footer-sidebar-2' ); ?>
</div>
<?php endif; ?>
<?php if ( is_active_sidebar( 'footer-sidebar-3' ) ) : ?>
<div id="footer-third" class="<?php echo $third; ?>">
<?php dynamic_sidebar( 'footer-sidebar-3' ); ?>
</div>
<?php endif; ?>
</div>
</div>
</div>