-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.php
94 lines (69 loc) · 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
</div><!--/.main-->
</div><!--/.wrapper-inner-->
<footer id="footer">
<?php if ( get_theme_mod( 'footer-ads', 'off' ) == 'on' ): ?>
<div id="footer-ads">
<?php dynamic_sidebar( 'footer-ads' ); ?>
</div><!--/#footer-ads-->
<?php endif; ?>
<?php // footer widgets
$total = 4;
if ( get_theme_mod( 'footer-widgets','0' ) != '' ) {
$total = get_theme_mod( '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 )
{ ?>
<div id="footer-widgets">
<div class="pad group">
<?php $i = 0; while ( $i < $total ) { $i++; ?>
<?php if ( is_active_sidebar( 'footer-' . $i ) ) { ?>
<div class="footer-widget-<?php echo esc_attr( $i ); ?> grid <?php echo esc_attr( $class ); ?> <?php if ( $i == $total ) { echo 'last'; } ?>">
<?php dynamic_sidebar( 'footer-' . $i ); ?>
</div>
<?php } ?>
<?php } ?>
</div><!--/.pad-->
</div><!--/#footer-widgets-->
<?php } ?>
<div id="footer-bottom">
<a id="back-to-top" href="#"><i class="fas fa-angle-up"></i></a>
<div class="pad group">
<div class="grid one-full">
<?php if ( get_theme_mod('footer-logo') ): ?>
<img id="footer-logo" src="<?php echo esc_url( get_theme_mod('footer-logo') ); ?>" alt="<?php echo esc_attr( get_bloginfo('name')); ?>">
<?php endif; ?>
<div id="copyright">
<?php if ( get_theme_mod( 'copyright' ) ): ?>
<p><?php echo esc_html( get_theme_mod( 'copyright' ) ); ?></p>
<?php else: ?>
<p><?php bloginfo(); ?> © <?php echo esc_html( date_i18n( esc_html__( 'Y', 'typeflow' ) ) ); ?>. <?php esc_html_e( 'All Rights Reserved.', 'typeflow' ); ?></p>
<?php endif; ?>
</div><!--/#copyright-->
<?php if ( get_theme_mod( 'credit', 'on' ) == 'on' ): ?>
<div id="credit">
<p><?php esc_html_e('Powered by','typeflow'); ?> <a href="<?php esc_url( _e( 'https://wordpress.org', 'typeflow' ) ); ?>" rel="nofollow">WordPress</a>. <?php esc_html_e('Theme by','typeflow'); ?> <a href="http://alx.media" rel="nofollow">Alx</a>.</p>
</div><!--/#credit-->
<?php endif; ?>
<?php if ( get_theme_mod( 'footer-social', 'on' ) == 'on' ): ?>
<?php typeflow_social_links() ; ?>
<?php endif; ?>
</div>
</div><!--/.pad-->
</div><!--/#footer-bottom-->
</footer><!--/#footer-->
</div><!--/.wrapper-outer-->
<div class="canvas-top"></div>
<div class="canvas-bottom"></div>
<div class="canvas-wrapper">
<div class="canvas-inner"></div>
</div>
<?php wp_footer(); ?>
</body>
</html>