-
Notifications
You must be signed in to change notification settings - Fork 6
/
footer.php
70 lines (62 loc) · 2.35 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
<?php
/**
* The template for displaying the footer
*
* Contains the closing of the #content div and all content after.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Panda3D
*/
?>
</div><!-- #content -->
<footer id="footer" class="site-footer">
<div class="wrap">
<div class="footer__navigation">
<?php
// Cycle through theme locations to retrieve custom menu and title
$locations = get_nav_menu_locations();
$footer_locations = array('footer-menu-1', 'footer-menu-2', 'footer-menu-3');
?>
<?php foreach($footer_locations as $location) { ?>
<div class="footer__menu">
<?php $menu_id = $locations[$location]; ?>
<h2><?php $nav_menu = wp_get_nav_menu_object($menu_id); echo $nav_menu->name; ?></h2>
<?php
wp_nav_menu( array(
'theme_location' => $location,
'menu_id' => $location,
) );
?>
</div>
<?php } ?>
<div class="footer__social">
<div class="footer__textblock">
<i class="fal fa-comment-alt-dots fa-flip-horizontal fa-5x"></i>
Want to chat with other developers, or ask questions about Panda3D? <a target="_blank" href="ircs://irc.libera.chat:6697/panda3d">#panda3d</a> on <a target="_blank" href="https://libera.chat/">Libera Chat</a>.
</div>
<?php if(have_rows('social_icons', 'option')): ?>
<?php while(have_rows('social_icons', 'option')): the_row(); ?>
<a href="<?php the_sub_field('social_url'); ?>" target="_blank"><i title=""<?php the_sub_field('social_name'); ?>" class="fab fa-<?php the_sub_field('social_icon'); ?> fa-3x"></i></a>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
<div class="footer__copyright">
<?php
$date_start = get_field('copyright_year', 'option');
$date_current = date("Y");
if(strcmp($date_start, $date_current) === 0) {
$date_string = $date_start;
} else {
$date_string = $date_start . '-' . $date_current;
}
?>
<span>© <?php echo $date_string; ?> <a href="<?php the_field('copyright_url', 'option'); ?>" target="_blank"><?php the_field('copyright_holder', 'option'); ?></a></span>
</div>
</div>
</footer>
</div><!-- #page -->
<?php wp_footer(); ?>
</body>
</html>