-
Notifications
You must be signed in to change notification settings - Fork 2
/
footer.php
92 lines (73 loc) · 2.98 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
<?php
$locationsArgs = array(
'post_type' => 'locations',
'posts_per_page' => -1,
'order' => 'ASC',
'orderby' => 'menu_order'
);
$locations = new WP_Query($locationsArgs);
?>
<div class="footer">
<div class="footer-content">
<div class="contact-buttons">
<?php if( get_theme_mod( 'phone_button_text_setting') != ""): ?>
<div class="phone-button">
<?php if( get_theme_mod( 'phone_button_icon_setting')): ?>
<?php echo get_theme_mod( 'phone_button_icon_setting'); ?>
<?php endif; ?>
<span><?php echo get_theme_mod( 'phone_button_text_setting'); ?></span>
</div>
<?php endif; ?>
<?php if ( has_nav_menu( 'footer_cta' ) ) {
wp_nav_menu( array(
'theme_location' => 'footer_cta',
'container_class' => 'cta-footer'
) );
} ?>
</div>
<div class="footer-inner">
<?php if ( has_nav_menu( 'adtnl_footer_links' ) ) {
wp_nav_menu( array(
'theme_location' => 'adtnl_footer_links',
'container_class' => 'adtnl-footer-links'
) );
} ?>
<?php if($locations->have_posts()): ?>
<div class="locations-container">
<?php while($locations->have_posts()): $locations->the_post(); ?>
<div class="location">
<h6 class="location-title"><?php the_title() ?></h6>
<p class="location-address"><?php the_content()?></p>
</div>
<?php endwhile; ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php if ( has_nav_menu( 'social_media_links' ) ): ?>
<div class="footer-bar">
<?php wp_nav_menu( array(
'theme_location' => 'social_media_links',
'container_class' => 'adtnl-footer-links'
) );
?>
</div>
<?php endif; ?>
<?php $docMessage = get_theme_mod( 'doc_message_setting'); ?>
<?php wp_footer(); ?>
<script>
// Function controlling document title change
var docTitle = document.title;
window.onblur = function() {
var docMessage = '<?= $docMessage; ?>';
if(docMessage != ""){
document.title = docMessage;
}
}
window.onfocus = function() {
document.title = docTitle;
}
</script>
</body>
</html>