-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfooter.php
170 lines (141 loc) · 7.6 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<?php global $scrollTriggerCount;
global_color_change_trigger('blue'); ?>
<footer class="footer js-footer" data-st-count="<?php $scrollTriggerCount--; echo $scrollTriggerCount; ?>">
<div class="css-max-text-width">
<div class="footer__menu-bar js-footer-row">
<nav class="footer__menu-bar__menu--wide footer__menu-bar__menu">
<span class="footer__menu-bar__menu__title css-title"><?php _e('What we do', 'visia'); ?></span>
<?php wp_nav_menu(array(
'menu_class' => 'footer__menu-bar__menu__list--split footer__menu-bar__menu__list',
'container' => null,
'theme_location' => 'footer_1',
'item_spacing' => 'discard'
)); ?>
</nav>
<nav class="footer__menu-bar__menu">
<span class="footer__menu-bar__menu__title css-title"><?php _e('What we are', 'visia'); ?></span>
<?php wp_nav_menu(array(
'menu_class' => 'footer__menu-bar__menu__list',
'container' => null,
'theme_location' => 'footer_2',
'item_spacing' => 'discard'
)); ?>
</nav>
<nav class="footer__menu-bar__menu">
<span class="footer__menu-bar__menu__title css-title"><?php _e('Contact', 'visia'); ?></span>
<?php $contactPhonePretty = get_field('optie_contact_telefoon_mooi', 'option');
$contactPhoneFormat = get_field('optie_contact_telefoon_geformatteerd', 'option');
$contactEmail = get_field('optie_contact_emailadres', 'option');
if($contactPhonePretty && $contactPhoneFormat || $contactEmail) {
echo '<ul class="footer__menu-bar__menu__list">';
if($contactPhonePretty && $contactPhoneFormat) {
echo '<li><a target="_blank" href="tel:'.$contactPhoneFormat.'">'.$contactPhonePretty.'</a></li>';
}
if($contactEmail) {
echo '<li><a target="_blank" href="mailto:'.$contactEmail.'">'.$contactEmail.'</a></li>';
}
echo '</ul>';
}
/* Button */
if($contactPageID = get_field('optie_paginalink_contact', 'option')) {
global_button(__('Get in touch', 'visia'), get_permalink($contactPageID), 'internal', 'footer__menu-bar__menu__button-wrapper');
} ?>
</nav>
</div>
<div class="footer__legal-bar js-footer-row">
<div class="footer__legal-bar__logo-wrapper">
<a class="footer__legal-bar__logo-wrapper__logo js-footer-logo" href="<?php echo get_home_url(); ?>">
<img class="footer__legal-bar__logo-wrapper__logo__img" src="<?php bloginfo('template_directory');?>/assets/img/Visia-Media-logo-black-outline.svg" width="275" height="157" alt="<?php esc_attr_e(get_bloginfo('name')); ?>">
</a>
</div>
<?php $contactSocialArr = array(
array(
'link' => get_field('optie_contact_facebook_url', 'option'),
'name' => 'Facebook',
'title' => __('Follow us on Facebook', 'visia')
),
array(
'link' => get_field('optie_contact_instagram_url', 'option'),
'name' => 'Instagram',
'title' => __('Follow us on Instagram', 'visia')
),
array(
'link' => get_field('optie_contact_linkedin_url', 'option'),
'name' => 'LinkedIn',
'title' => __('Follow us on LinkedIn', 'visia')
)
); ?>
<nav class="footer__legal-bar__menu">
<ul class="footer__legal-bar__menu__list">
<?php foreach($contactSocialArr as $contactSocial) {
if($contactSocial['link'] && $contactSocial['name']) { ?>
<li>
<a href="<?php echo $contactSocial['link']; ?>" target="_blank"><?php echo $contactSocial['name']; ?></a>
</li>
<?php }
} ?>
</ul>
</nav>
<nav class="footer__legal-bar__menu">
<small>© <?php echo date('Y'); ?>, <?php bloginfo('name'); ?></small>
<?php wp_nav_menu(array(
'menu_class' => 'footer__legal-bar__menu__list',
'container' => null,
'theme_location' => 'footer_legal',
'item_spacing' => 'discard'
)); ?>
</nav>
<div class="footer__legal-bar__logo-wrapper">
<a class="footer__legal-bar__logo-wrapper__logo--leadinfo footer__legal-bar__logo-wrapper__logo js-footer-logo" target="_blank" href="https://www.leadinfo.com/nl/">
<img class="footer__legal-bar__logo-wrapper__logo__img" src="<?php bloginfo('template_directory');?>/assets/img/Leadinfo-partner-badge.svg" width="290" height="130" alt="<?php esc_attr_e(__('Leadinfo', 'visia')); ?>">
</a>
</div>
</div>
<?php $knowledgeBaseQuery = new WP_Query(array(
'posts_per_page' => -1,
'tag' => 'kennisbank'
));
if($knowledgeBaseQuery->have_posts()) { ?>
<div class="footer__knowledge-base js-footer-row">
<button class="footer__knowledge-base__title css-title js-footer-kb-toggle" data-no-blobity="true"><?php _e('Knowledge base', 'visia'); ?> <span class="footer__knowledge-base__title__toggle js-footer-kb-toggle-icon"><i class="fa-solid fa-caret-down"></i></span></button>
<ul class="footer__knowledge-base__menu js-footer-kb-list">
<?php while($knowledgeBaseQuery->have_posts()) {
$knowledgeBaseQuery->the_post();
if(get_field('kennisbanktitel')) {
$title = get_field('kennisbanktitel');
} else {
$title = get_the_title();
}
echo '<li><a href="'.get_permalink().'">'.$title.'</a></li>';
} ?>
</ul>
</div>
<?php } wp_reset_postdata(); ?>
</div>
</footer>
<?php /* Determine transition title */
if(is_archive()) {
$itemTitle = get_the_archive_title();
} elseif(get_field('transitietitel', get_queried_object_id())) {
$itemTitle = get_field('transitietitel', get_queried_object_id());
} else {
$itemTitle = get_the_title(get_queried_object_id());
}
/* Determine active menu item */
if(is_home() || is_archive() || is_singular('post')) {
$activeItemID = get_option('page_for_posts');
} elseif(is_singular('landingpage') && get_field('optie_paginalink_expertises', 'option')) {
$activeItemID = get_field('optie_paginalink_expertises', 'option');
} elseif(is_singular('case') && get_field('optie_paginalink_cases', 'option')) {
$activeItemID = get_field('optie_paginalink_cases', 'option');
} elseif($postAncestors = get_post_ancestors(get_queried_object_id())) {
$activeItemID = array_pop($postAncestors);
} else {
$activeItemID = get_queried_object_id();
} ?>
<div class="js-item-object"<?php echo ($itemTitle) ? ' data-item-title="'.esc_attr($itemTitle).'"' : ''; echo ($activeItemID) ? ' data-active-menu-item="'.$activeItemID.'"' : '' ?>></div>
</div>
</div>
<?php wp_footer(); ?>
</body>
</html>