-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfooter.php
More file actions
142 lines (116 loc) · 5.32 KB
/
footer.php
File metadata and controls
142 lines (116 loc) · 5.32 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
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
<?php
$style = '';
$color = get_field('color_theme', 'option');
$bg_image = get_field('background_image', 'option');
if ($bg_image) {
$style = 'style="background:url(\'' . wp_get_attachment_url($bg_image, 'full') . '\') no-repeat center; background-size: cover"';
$overlay_color = get_field('overlay_color', 'option');
}
?>
<footer class="footer_main <?php echo $color; ?> <?php echo $overlay_color; ?> section_spacing_top_medium"
<?php echo $style; ?>>
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="contact">
<?php if (function_exists('acf_add_options_page')) { ?>
<?php $contact_phrase = get_field('contact_phrase', 'option');
$text_field = get_field('text_field', 'option');
$adress_field = get_field('adress_field', 'option');
$phone_field = get_field('phone_field', 'option');
$link = get_field('mail_link', 'option');
?>
<div class="text">
<?php if ($contact_phrase) { ?>
<h2 class="contact_phrase"><?php echo $contact_phrase ?></h2>
<?php } ?>
<?php if ($text_field) { ?>
<p class="text_field"><?php echo $text_field ?></p>
<?php } ?>
</div>
<h6 class="logo">
<a class="" href="<?php echo esc_url(home_url('/')); ?>">
<?php bloginfo('name'); ?>
</a>
</h6>
<?php if ($adress_field) { ?>
<p class="adress_field"><?php echo $adress_field ?></p>
<?php } ?>
<?php if ($phone_field) { ?>
<p class="phone_field"><?php echo $phone_field ?></p>
<?php } ?>
<div class="social-icons">
<ul class="social">
<?php if ($link) { ?>
<li class="social-item">
<a href="mailto:<?php echo $link; ?>" target="_top"><i class="fas fa-envelope"
aria-hidden="true"></i>
<?php echo $link; ?></a>
</li>
<?php } ?>
<?php if (have_rows('social_icons', 'option')) { //repeater field
?>
<?php
while (have_rows('social_icons', 'option')) {
the_row();
$social_url = get_sub_field('social_url');
$social_site = get_sub_field('social_site'); ?>
<li class="social-item">
<a href="<?php echo $social_url; ?>"><i class="fab fa-<?php echo $social_site; ?>"></i>
<?php echo $social_site; ?></a>
</li>
<?php
}
} ?>
</div>
<?php
} ?>
</div>
</div>
<div class="col-md-4 offset-md-1 order-first order-md-last">
<div class="links">
<ul class="footer-links">
<?php
if (function_exists('acf_add_options_page')) {
if (have_rows('footer_links', 'option')) { // check if repeater field has rows
while (have_rows('footer_links', 'option')) { // loop through the rows of data
the_row();
$link = get_sub_field('link');
if ($link) { ?>
<li class="link-item">
<a href="<?php echo $link['url']; ?>" target="<?php echo $link['target']; ?>">
<?php echo $link['title']; ?>
</a>
</li>
<?php }
}
}
}
?>
</ul>
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="to_top">
<a href="#header" class="to_top_btn">Back to top </a>
</div>
</div>
</div>
<div class="row justify-content-center">
<div class="col-md-6">
<div class="footer-copy">
<div class="copy">
<p>© <?php echo Date('Y'); ?> - <?php bloginfo('name'); ?> INC. ALL RIGHTS RESERVED. Theme
by <a href="http://karinljunggren.com/" target="_blank">Karin</a>
</p>
</div>
</div>
</div>
</div>
</div>
</footer>
<?php wp_footer(); ?>
</body>
</html>