-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfooter.php
More file actions
88 lines (65 loc) · 2.16 KB
/
footer.php
File metadata and controls
88 lines (65 loc) · 2.16 KB
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
<footer>
<div class="conteiner-footer">
<div>
<?php
dynamic_sidebar('footer-2')
?>
</div>
<div class="social-media">
<h4>Redes sociais</h4>
<?php
$social_networks = array(
'facebook' => 'fab fa-facebook-f',
'twitter' => 'fab fa-twitter',
'instagram' => 'fab fa-instagram',
'linkedin' => 'fab fa-linkedin-in',
'youtube' => 'fab fa-youtube',
'tiktok' => 'fab fa-tiktok',
'telegram' => 'fab fa-telegram'
);
foreach ($social_networks as $key => $class) {
$url = get_theme_mod("social_media_{$key}");
if ($url) {
echo '<a href="' . esc_url($url) . '" target="_blank" class="social-icon">';
echo '<i class="' . esc_attr($class) . '"></i>';
echo '</a>';
}
}
?>
</div>
<div class="footer-menu">
<?php
$menu_location = 'footer';
$locations = get_nav_menu_locations();
if (isset($locations[$menu_location])) {
$menu_id = $locations[$menu_location];
$menu_object = wp_get_nav_menu_object($menu_id);
if ($menu_object) {
echo '<h4>' . esc_html($menu_object->name) . '</h4>';
}
wp_nav_menu(
array(
'menu' => $menu_object->slug,
'container' => '',
'theme_location' => $menu_location,
'items_wrap' => '<ul id="" class="nav-menu-footer">%3$s</ul>',
'depth' => 2
)
);
} else {
echo '<p>Menu não encontrado.</p>';
}
?>
</div>
<div>
<?php
dynamic_sidebar('footer-1')
?>
</div>
</div>
</footer>
<?php
wp_footer();
?>
</body>
</html>