-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfooter.php
executable file
·65 lines (52 loc) · 1.71 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
<?php
/**
* The template for displaying the footer
*
* Contains footer content and the closing of the #main and #page div elements.
*
* @package WordPress
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/
$admin_email = get_option( 'admin_email' );
?>
</section>
<footer class="footer">
<div class="footer-columns">
<div class="footer-logo">
<a href="/"><img src="<?php bloginfo( 'template_url' ) ?>/img/logo.svg" class="logo-footer" /></a>
</div>
<div class="footer-content">
<?php
// the footer content
the_field( 'footer_content', 'option' );
?>
<?php
// check if the nested repeater field has rows of data
if ( have_rows( 'footer_social', 'option' ) ):
print '<div class="social-icons">';
// loop through the rows of data
while ( have_rows( 'footer_social', 'option' ) ) : the_row();
$name = get_sub_field('name');
$network = get_sub_field('network');
$link = get_sub_field('link');
// get the template path, and get the svg contents from there
$template_path = get_template_directory();
$social_icon = file_get_contents( $template_path . '/img/social/' . $network . '.svg' );
echo '<a href="' . $link . '" target="_blank">' . $social_icon . '</a>';
endwhile;
print '</div>';
endif;
?>
<p class="copyright quiet"><?php the_field( 'footer_copyright', 'option' ); ?></p>
</div>
<div class="footer-menu">
<?php wp_nav_menu( array( 'theme_location' => 'footer-menu', 'menu_class' => 'nav-menu' ) ); ?>
</div>
</div>
<p class="copyright quiet"><?php the_field( 'footer_copyright', 'option' ); ?></p>
</footer>
</div><!-- #container -->
<?php wp_footer(); ?>
</body>
</html>