-
Notifications
You must be signed in to change notification settings - Fork 1
/
footer.php
71 lines (58 loc) · 2.12 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
<?php
/**
* The template for displaying the footer.
*
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package medium_magazin_beta
*/
?>
<footer class="row m-t mmbeta_footer" role="contentinfo">
<?php if ( is_active_sidebar( 'footer_sidebar' ) ) : ?>
<div id="footer-sidebar" class="footer-sidebar widget-area" role="complementary">
<?php dynamic_sidebar( 'footer_sidebar' ); ?>
</div><!-- footer-sidebar -->
<?php endif; ?>
<!-- Footer Menu -->
<?php
$menu_name = 'footer';
if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name ] ) ) {
$menu = wp_get_nav_menu_object( $locations[ $menu_name ] );
$menu_items = wp_get_nav_menu_items($menu->term_id);
$menu_list = '<nav class="container d-flex flex-wrap flex-row justify-content-center" role="navigation">';
foreach ( (array) $menu_items as $key => $menu_item ) {
$title = $menu_item->title;
$url = $menu_item->url;
$menu_list .= '<a class="nav-link col-12 col-md-3 align-self-center text-md-center" href="' . $url . '">' . $title . '</a>';
}
$menu_list .= '</nav>';
} else {
$menu_list = '<ul><li>Menu "' . $menu_name . '" not defined.</li></ul>';
}
echo $menu_list;
?>
</footer><!-- #colophon -->
</div><!-- #page footer -->
<?php wp_footer(); ?>
<!-- Box to show a popup in -->
<div class="modal fade" id="imageModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<img class="img-responsive" id="modal_image" src="">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- End of Image Modal box -->
</body>
</html>