blogrow/footer.php

83 lines
2.8 KiB
PHP
Raw Normal View History

2015-12-11 17:09:48 +01:00
</div><!--/.main-->
</div><!--/.container-->
<footer id="footer">
<div class="fslant-topleft"></div>
<div class="fslant-topright"></div>
<div class="fslant-bottomleft"></div>
<div class="fslant-bottomright"></div>
<?php // footer widgets
$total = 4;
2017-12-17 12:32:54 +01:00
if ( get_theme_mod( 'footer-widgets','0' ) != '' ) {
2015-12-11 17:09:48 +01:00
2017-12-17 12:32:54 +01:00
$total = get_theme_mod( 'footer-widgets' );
2015-12-11 17:09:48 +01:00
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 )
{ ?>
2017-03-05 21:42:46 +01:00
<div id="footer-widgets" class="container">
2015-12-11 17:09:48 +01:00
<div class="pad group">
<?php $i = 0; while ( $i < $total ) { $i++; ?>
<?php if ( is_active_sidebar( 'footer-' . $i ) ) { ?>
2016-03-22 13:00:44 +01:00
<div class="footer-widget-<?php echo esc_attr( $i ); ?> grid <?php echo esc_attr( $class ); ?> <?php if ( $i == $total ) { echo 'last'; } ?>">
2015-12-11 17:09:48 +01:00
<?php dynamic_sidebar( 'footer-' . $i ); ?>
</div>
<?php } ?>
<?php } ?>
</div><!--/.pad-->
2017-03-05 21:42:46 +01:00
</div><!--/#footer-widgets-->
2015-12-11 17:09:48 +01:00
<?php } ?>
2017-03-05 21:42:46 +01:00
<div id="footer-bottom">
2015-12-11 17:09:48 +01:00
<div class="container">
2019-07-29 21:21:44 +02:00
<a id="back-to-top" href="#"><i class="fas fa-angle-up"></i></a>
2015-12-11 17:09:48 +01:00
<div class="pad group">
<div class="grid one-half">
2017-12-17 12:32:54 +01:00
<?php if ( get_theme_mod('footer-logo') ): ?>
2018-09-08 16:49:15 +02:00
<img id="footer-logo" src="<?php echo esc_url( get_theme_mod('footer-logo') ); ?>" alt="<?php echo esc_attr( get_bloginfo('name')); ?>">
2015-12-11 17:09:48 +01:00
<?php endif; ?>
<div id="copyright">
2017-12-17 12:32:54 +01:00
<?php if ( get_theme_mod( 'copyright' ) ): ?>
2018-05-26 12:19:06 +02:00
<p><?php echo esc_html( get_theme_mod( 'copyright' ) ); ?></p>
2015-12-11 17:09:48 +01:00
<?php else: ?>
2018-09-08 16:49:15 +02:00
<p><?php bloginfo(); ?> &copy; <?php echo esc_html( date_i18n( esc_html__( 'Y', 'blogrow' ) ) ); ?>. <?php esc_html_e( 'All Rights Reserved.', 'blogrow' ); ?></p>
2015-12-11 17:09:48 +01:00
<?php endif; ?>
</div><!--/#copyright-->
2017-12-17 12:32:54 +01:00
<?php if ( get_theme_mod( 'credit', 'on' ) == 'on' ): ?>
2015-12-11 17:09:48 +01:00
<div id="credit">
<p><?php esc_html_e('Powered by','blogrow'); ?> <a href="http://wordpress.org" rel="nofollow">WordPress</a>. <?php esc_html_e('Theme by','blogrow'); ?> <a href="https://agnarson.com" rel="nofollow">Alx</a>.</p>
2015-12-11 17:09:48 +01:00
</div><!--/#credit-->
<?php endif; ?>
</div>
<div class="grid one-half last">
2018-07-15 19:49:22 +02:00
<?php if ( get_theme_mod( 'footer-social', 'on' ) == 'on' ): ?>
<?php blogrow_social_links() ; ?>
2018-07-15 19:49:22 +02:00
<?php endif; ?>
2015-12-11 17:09:48 +01:00
</div>
</div><!--/.pad-->
</div><!--/.container-->
2017-03-05 21:42:46 +01:00
</div><!--/#footer-bottom-->
2015-12-11 17:09:48 +01:00
</footer><!--/#footer-->
</div><!--/#wrapper-->
<?php wp_footer(); ?>
</body>
</html>