-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfooter.php
107 lines (102 loc) · 3.84 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
<?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 Separate_Blog
*/
?>
<footer class="main-footer">
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="logo">
<h6 class="text-white"><?php esc_html_e( 'Address', 'separate-blog' ); ?></h6>
</div>
<div class="contact-details">
<?php echo esc_textarea( wpautop( get_theme_mod( 'separate_blog_address' ), true ) ); ?>
<p><?php echo sprintf( 'Email: %s', separate_blog_admin_email() ); ?></p>
<ul class="social-menu">
<?php if ( get_theme_mod( 'separate_blog_facebook' ) ): ?>
<li class="list-inline-item">
<a href="<?php echo esc_url( get_theme_mod( 'separate_blog_facebook' ) ); ?>"><i class="fa fa-facebook"></i></a>
</li>
<?php endif; ?>
<?php if ( get_theme_mod( 'separate_blog_twitter' ) ): ?>
<li class="list-inline-item">
<a href="<?php echo esc_url( get_theme_mod( 'separate_blog_twitter' ) ); ?>"><i class="fa fa-twitter"></i></a>
</li>
<?php endif; ?>
<?php if ( get_theme_mod( 'separate_blog_google_plus' ) ): ?>
<li class="list-inline-item">
<a href="<?php echo esc_url( get_theme_mod( 'separate_blog_google_plus' ) ); ?>"><i class="fa fa-google-plus"></i></a>
</li>
<?php endif; ?>
<?php if ( get_theme_mod( 'separate_blog_instagram' ) ): ?>
<li class="list-inline-item">
<a href="<?php echo esc_url( get_theme_mod( 'separate_blog_instagram' ) ); ?>"><i class="fa fa-instagram"></i></a>
</li>
<?php endif;?>
<?php if ( get_theme_mod( 'separate_blog_youtube' ) ): ?>
<li class="list-inline-item">
<a href="<?php echo esc_url( get_theme_mod( 'separate_blog_youtube' ) ); ?>"><i class="fa fa-youtube"></i></a>
</li>
<?php endif; ?>
<?php if ( get_theme_mod( 'separate_blog_pinterest' ) ): ?>
<li class="list-inline-item">
<a href="<?php echo esc_url( get_theme_mod( 'separate_blog_pinterest' ) ); ?>"><i class="fa fa-pinterest"></i></a>
</li>
<?php endif; ?>
</ul>
</div>
</div>
<?php if ( has_nav_menu( 'footer' ) ) : ?>
<div class="col-md-4">
<div class="menus d-flex">
<?php
wp_nav_menu(
array(
'theme_location' => 'footer',
'container' => 'ul',
'menu_class' => 'list-unstyled',
)
);
?>
</div>
</div>
<?php endif; ?>
<div class="col-md-4">
<div class="latest-posts">
<?php
$recent_posts = wp_get_recent_posts( array( 'numberposts' => 3 ) );
foreach( $recent_posts as $recent ) {
echo '<a href="' . esc_url( get_permalink( $recent['ID'] ) ) . '">
<div class="post d-flex align-items-center">
<div class="image">' . get_the_post_thumbnail( $recent['ID'], 'separate-blog-recent-thumbnail' ) . '</div>
<div class="title"><strong>' . esc_html( get_the_title( $recent['ID'] ) ) . '</strong><span class="date last-meta">' . esc_html( get_the_time( get_option( 'date_format' ), $recent['ID'] ) ) . '</span></div>
</div></a>';
} ?>
</div>
</div>
</div>
</div>
<div class="copyrights">
<div class="container">
<div class="row">
<div class="col-md-6">
© <?php echo esc_html( date_i18n( 'Y' ) ); ?> <?php bloginfo( 'name' ); ?> ·
<?php $link = wp_sprintf( '<a href="%1$s" title="%2$s" rel="%3$s">%4$s</a>', esc_url( 'http://profiles.wordpress.org/dilipbheda' ), 'WordPress Profile', 'nofollow', 'Dilip Bheda' );
printf( esc_html__( '%1$s Theme by %2$s', 'separate-blog' ), 'Separate Blog', $link );
?>
</div>
</div>
</div>
</div>
</footer>
</div><!-- #content -->
<?php wp_footer(); ?>
</body>
</html>