-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfooter.php
More file actions
103 lines (91 loc) · 3.41 KB
/
footer.php
File metadata and controls
103 lines (91 loc) · 3.41 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
<?php
/**
* The template for displaying the footer
*
* Contains the closing of the #content div and all content after.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package DesignFly
*/
?>
</div><!-- #content -->
<footer id="footer-wrapper" class="site-footer">
<div class="content container">
<hr class="bar" />
<div class="row">
<div class="info col-sm-6">
<?php
// the query
$the_query = new WP_Query( array(
'posts_per_page' => 1,
) );
if ( $the_query->have_posts() ) :
$the_query->the_post();
?>
<p class="title"><a href="<?php echo get_post_permalink(); ?>"><?php echo get_the_title(); ?> </a></p>
<p class="para"> <?php echo get_the_excerpt(); ?> </p>
<?php
wp_reset_postdata();
else :
__('No Posts found');
endif;
?>
</div>
<div class="contact-us col-sm-6">
<p class="title"><?php esc_html_e( 'Contact Us', 'designfly' ); ?></p>
<p class="address"> <?php echo get_theme_mod( 'designfly-footer-contact' ); ?> </p>
<span><?php esc_html_e( 'Email', 'designfly' ); ?>: <p class="email">
<a href="mailto:<?php echo get_theme_mod( 'designfly-footer-email' ); ?>">
<?php echo get_theme_mod( 'designfly-footer-email' ); ?>
</a></p> </span>
<ul class="social-media">
<?php
/* social media urls */
$urls = get_theme_mod( 'designfly-footer-urls' );
$urls = explode( ';', $urls );
foreach ( $urls as $url ) :
$url = trim( $url );
if ( strpos( $url, 'facebook.com' ) !== false ) { ?>
<li>
<a target="_blank" href="<?php echo $url; ?>"><img id="social-facebook" src=" <?php echo get_template_directory_uri() . '/assets/images/facebook.png' ?>" /></a>
</li> <?php
} elseif ( strpos( $url, 'google' ) !== false ) { ?>
<li>
<a target="_blank" href="<?php echo $url; ?>"><img id="social-gp" src=" <?php echo get_template_directory_uri() . '/assets/images/gp.png' ?> " /></a>
</li> <?php
} elseif ( strpos( $url, 'linkedin.com' ) !== false ) { ?>
<li>
<a target="_blank" href="<?php echo $url; ?>"><img id="social-linkedin" src=" <?php echo get_template_directory_uri() . '/assets/images/linkedin.png' ?> " /></a>
</li> <?php
} elseif ( strpos( $url, 'pinterest.com' ) !== false ) { ?>
<li>
<a target="_blank" href="<?php echo $url; ?>"><img id="social-pin" src=" <?php echo get_template_directory_uri() . '/assets/images/pin.png' ?> " /></a>
</li> <?php
} elseif ( strpos( $url, 'twitter.com' ) !== false ) { ?>
<li>
<a target="_blank" href="<?php echo $url; ?>"><img id="social-twitter" src=" <?php echo get_template_directory_uri() . '/assets/images/twitter.png' ?> " /></a>
</li> <?php
}
endforeach;
?>
</ul>
</div>
</div>
<hr class="bar" />
</div>
<?php
if ( get_theme_mod( 'designfly-footer-display', 'Yes' ) == 'Yes' ) :
?>
<div class="site-info container">
<p> <?php echo esc_html__( get_theme_mod( 'designfly-footer-info' ) ); ?> | <?php esc_html_e( 'Designed by', 'designfly' ); ?><a href="https://www.rtcamp.com">rtCamp</a>
</p>
</div>
<?php
endif;
?>
</footer><!-- #footer-wrapper -->
</div><!-- #page -->
<?php wp_footer(); ?>
</body>
</html>