100 lines
No EOL
3.3 KiB
PHP
Executable file
100 lines
No EOL
3.3 KiB
PHP
Executable file
<?php
|
|
|
|
$footer_widget_area = 'Display Footer Widget Area';
|
|
$footer_copyright = 'Copyright © 2024 RP1. | All Rights Reserved';
|
|
$footer_layout = 'option-2';
|
|
$footer_widgets_col = 'col-sm widget--footer';
|
|
|
|
// Get widget column class
|
|
if ( 'option-1col' == $footer_layout ) {
|
|
$footer_widgets_col = 'col-sm-12 col-md-6 offset-lg-3 col-lg-6 offset-lg-3';
|
|
} else if ( 'option-2cols' == $footer_layout ) {
|
|
$footer_widgets_col = 'col-sm-6 col-md-6';
|
|
} elseif ( 'option-1' == $footer_layout ) {
|
|
$footer_widgets_col = 'col-sm-4 col-md-4';
|
|
}
|
|
|
|
?>
|
|
</div>
|
|
</main>
|
|
|
|
<footer id="footer" class="footer">
|
|
<?php if ( true == $footer_widget_area ) { ?>
|
|
<!-- Footer Widget -->
|
|
<div class="footer-widgets">
|
|
<div class="container">
|
|
<div class="row footer-widgets__row footer-widgets__row--is-numbered">
|
|
<?php if ( is_active_sidebar( 'footer-widget-1' ) ) { ?>
|
|
<div class="<?php echo esc_attr( $footer_widgets_col ); ?>">
|
|
<div class="widget__header">
|
|
<?php dynamic_sidebar('footer-widget-1'); ?></div>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if ( is_active_sidebar( 'footer-widget-2' ) ) { ?>
|
|
<div class="<?php echo esc_attr( $footer_widgets_col ); ?>">
|
|
<div class="widget__header">
|
|
<?php dynamic_sidebar('footer-widget-2'); ?>
|
|
</div>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if ( is_active_sidebar( 'footer-widget-3' ) ) { ?>
|
|
<div class="<?php echo esc_attr( $footer_widgets_col ); ?>">
|
|
<div class="widget__header">
|
|
<?php dynamic_sidebar('footer-widget-3'); ?>
|
|
</div>
|
|
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if ( is_active_sidebar( 'footer-widget-4' ) && ( 'option-2' == $footer_layout || 'option-2cols' == $footer_layout || 'option-1col' == $footer_layout) ) { ?>
|
|
<div class="<?php echo esc_attr( $footer_widgets_col ); ?>">
|
|
<div class="widget__header">
|
|
<?php dynamic_sidebar('footer-widget-4'); ?>
|
|
</div>
|
|
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Footer Widget / End -->
|
|
<?php } ?>
|
|
|
|
<!-- Footer Copyright -->
|
|
<div class="footer-copyright">
|
|
<div class="container">
|
|
<!-- Logo - Image Based -->
|
|
<div class="footer__logo footer__logo--img">
|
|
<a href="https://rp1.hu/"><img src="<?php echo get_bloginfo('template_directory'); ?>/assets/img/footer-logo.png" srcset="<?php echo get_bloginfo('template_directory'); ?>/assets/img/footer-logo@2x.png 2x" alt="Logo" title="RP Lábléc logó" width="auto" height="auto"></a>
|
|
</div>
|
|
<!-- Logo - Image Based / End -->
|
|
<?php if ( ! empty( $footer_copyright ) ) { ?>
|
|
<div class="footer-copyright__txt">
|
|
<?php echo wp_kses_post( $footer_copyright ); ?>
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
</div>
|
|
<!-- Footer Copyright / End -->
|
|
|
|
</footer>
|
|
|
|
<?php wp_footer(); ?>
|
|
<!-- JavaScript for toggling search form -->
|
|
<script type="text/javascript">
|
|
document.getElementById('search-icon').addEventListener('click', function(e) {
|
|
e.preventDefault();
|
|
var searchOverlay = document.getElementById('search-overlay');
|
|
searchOverlay.style.display = 'block';
|
|
});
|
|
|
|
document.getElementById('search-overlay').addEventListener('click', function(e) {
|
|
if (e.target.id === 'search-overlay') {
|
|
this.style.display = 'none';
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|