forked from presscustomizr/hueman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.php
103 lines (79 loc) · 3.3 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
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
</div><!--/.main-inner-->
</div><!--/.main-->
</div><!--/.container-inner-->
</div><!--/.container-->
<footer id="footer">
<?php if ( ot_get_option('footer-ads') == 'on' ): ?>
<section class="container" id="footer-ads">
<div class="container-inner">
<?php dynamic_sidebar( 'footer-ads' ); ?>
</div><!--/.container-inner-->
</section><!--/.container-->
<?php endif; ?>
<?php // footer widgets
$total = 4;
if ( ot_get_option( 'footer-widgets' ) != '' ) {
$total = ot_get_option( 'footer-widgets' );
if( $total == 1) $class = 'one-full';
if( $total == 2) $class = 'one-half';
if( $total == 3) $class = 'one-third';
if( $total == 4) $class = 'one-fourth';
}
if ( ( is_active_sidebar( 'footer-1' ) ||
is_active_sidebar( 'footer-2' ) ||
is_active_sidebar( 'footer-3' ) ||
is_active_sidebar( 'footer-4' ) ) && $total > 0 )
{ ?>
<section class="container" id="footer-widgets">
<div class="container-inner">
<div class="pad group">
<?php $i = 0; while ( $i < $total ) { $i++; ?>
<?php if ( is_active_sidebar( 'footer-' . $i ) ) { ?>
<div class="footer-widget-<?php echo $i; ?> grid <?php echo $class; ?> <?php if ( $i == $total ) { echo 'last'; } ?>">
<?php dynamic_sidebar( 'footer-' . $i ); ?>
</div>
<?php } ?>
<?php } ?>
</div><!--/.pad-->
</div><!--/.container-inner-->
</section><!--/.container-->
<?php } ?>
<?php if ( has_nav_menu( 'footer' ) ): ?>
<nav class="nav-container group" id="nav-footer">
<div class="nav-toggle"><i class="fa fa-bars"></i></div>
<div class="nav-text"><!-- put your mobile menu text here --></div>
<div class="nav-wrap"><?php wp_nav_menu( array('theme_location'=>'footer','menu_class'=>'nav container group','container'=>'','menu_id'=>'','fallback_cb'=>false) ); ?></div>
</nav><!--/#nav-footer-->
<?php endif; ?>
<section class="container" id="footer-bottom">
<div class="container-inner">
<a id="back-to-top" href="#"><i class="fa fa-angle-up"></i></a>
<div class="pad group">
<div class="grid one-half">
<?php if ( ot_get_option('footer-logo') ): ?>
<img id="footer-logo" src="<?php echo ot_get_option('footer-logo'); ?>" alt="<?php get_bloginfo('name'); ?>">
<?php endif; ?>
<div id="copyright">
<?php if ( ot_get_option( 'copyright' ) ): ?>
<p><?php echo esc_attr( ot_get_option( 'copyright' ) ); ?></p>
<?php else: ?>
<p><?php bloginfo(); ?> © <?php echo date( 'Y' ); ?>. <?php _e( 'All Rights Reserved.', 'hueman' ); ?></p>
<?php endif; ?>
</div><!--/#copyright-->
<?php if ( ot_get_option( 'credit' ) != 'off' ): ?>
<div id="credit">
<p><?php _e('Powered by','hueman'); ?> <a href="http://wordpress.org" rel="nofollow">WordPress</a>. <?php _e('Theme by','hueman'); ?> <a href="http://alxmedia.se" rel="nofollow">Alx</a>.</p>
</div><!--/#credit-->
<?php endif; ?>
</div>
<div class="grid one-half last">
<?php alx_social_links() ; ?>
</div>
</div><!--/.pad-->
</div><!--/.container-inner-->
</section><!--/.container-->
</footer><!--/#footer-->
</div><!--/#wrapper-->
<?php wp_footer(); ?>
</body>
</html>