-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.php
152 lines (146 loc) · 6.34 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
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
143
144
145
146
147
148
149
150
151
152
<?php
$dp_options = get_design_plus_option();
// Get footer slider items
$slider_args = array(
'post_type' => $dp_options['footer_slider_type'],
'post_status' => 'publish',
'posts_per_page' => -1,
'orderby' => 'rand'
);
$slider_query = new WP_Query($slider_args);
// Whether footer information is displayed or not
$display_footer_info = is_front_page() ? $dp_options['display_footer_info_on_front'] : $dp_options['display_footer_info_on_sub'];
// Footer menu arguments
$menu_args = array(
'fallback_cb' => '',
// Hide the menu area if the footer menu is not registered
'items_wrap' => '<ul class="%2$s">%3$s</ul>',
'menu_class' => 'p-footer-nav',
'theme_location' => 'footer'
);
?>
</div><!-- /.l-contents -->
</main>
<footer class="l-footer">
<div class="p-footer-slider">
<?php if ($slider_query->have_posts()): ?>
<div id="js-footer-slider__inner" class="p-footer-slider__inner l-inner">
<?php
while ($slider_query->have_posts()):
$slider_query->the_post();
?>
<article class="p-article02 p-footer-slider__item">
<a class="p-hover-effect--<?php echo esc_attr($dp_options['hover_type']); ?>" href="<?php the_permalink(); ?>"
title="<?php the_title(); ?>">
<div class="p-article02__img">
<?php
if (has_post_thumbnail()) {
the_post_thumbnail('size1');
} else {
echo '<img src="' . get_template_directory_uri() . '/assets/images/592x410.gif" alt="">' . "\n";
}
?>
</div>
<h2 class="p-article02__title">
<?php echo is_mobile() ? wp_trim_words(get_the_title(), 23, '...') : wp_trim_words(get_the_title(), 40, '...'); ?>
</h2>
</a>
</article>
<?php
endwhile;
wp_reset_postdata();
?>
</div><!-- /.p-footer-slider__inner -->
<?php endif; ?>
</div><!-- /.p-footer-slider -->
<?php if ($display_footer_info): ?>
<div class="p-info">
<div class="p-info__inner l-inner">
<?php if ($dp_options['display_footer_info_col1']): ?>
<div class="p-info__col">
<div class="p-info__logo c-logo<?php if ($dp_options['footer_logo_image_retina']) {
echo ' c-logo--retina';
} ?>">
<?php if ('type1' === $dp_options['footer_use_logo_image']): // Use text ?>
<a href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo('name'); ?></a>
<?php else: // Use image ?>
<a href="<?php echo esc_url(home_url('/')); ?>">
<img src="<?php echo esc_attr(wp_get_attachment_url($dp_options['footer_logo_image'])); ?>"
alt="<?php bloginfo('name'); ?>">
</a>
<?php endif; ?>
</div>
<p class="p-info__address">
<?php echo nl2br(esc_html($dp_options['footer_address'])); ?>
</p>
<ul class="p-info__social p-social-nav">
<?php if ($dp_options['facebook_url']): ?>
<li class="p-social-nav__item p-social-nav__item--facebook">
<a href="<?php echo esc_url($dp_options['facebook_url']); ?>" target="_blank"></a>
</li>
<?php endif; ?>
<?php if ($dp_options['twitter_url']): ?>
<li class="p-social-nav__item p-social-nav__item--twitter">
<a href="<?php echo esc_url($dp_options['twitter_url']); ?>" target="_blank"></a>
</li>
<?php endif; ?>
<?php if ($dp_options['insta_url']): ?>
<li class="p-social-nav__item p-social-nav__item--instagram">
<a href="<?php echo esc_url($dp_options['insta_url']); ?>" target="_blank"></a>
</li>
<?php endif; ?>
<?php if ($dp_options['pinterest_url']): ?>
<li class="p-social-nav__item p-social-nav__item--pinterest">
<a href="<?php echo esc_url($dp_options['pinterest_url']); ?>" target="_blank"></a>
</li>
<?php endif; ?>
<?php if ($dp_options['mail_url']): ?>
<li class="p-social-nav__item p-social-nav__item--mail">
<a href="mailto:<?php echo sanitize_email($dp_options['mail_url']); ?>"></a>
</li>
<?php endif; ?>
<?php if ($dp_options['show_rss']): ?>
<li class="p-social-nav__item p-social-nav__item--rss">
<a href="<?php bloginfo('rss2_url'); ?>" target="_blank"></a>
</li>
<?php endif; ?>
</ul>
</div><!-- /.p-info__col -->
<?php endif; ?>
<?php if ($dp_options['display_footer_info_col2']): ?>
<div class="p-info__col">
<div class="p-info__text">
<p>
<?php echo nl2br($dp_options['footer_desc']); // No escape ?>
</p>
</div>
</div><!-- /.p-info__col -->
<?php endif; ?>
<?php if ($dp_options['display_footer_info_col3']): ?>
<div class="p-info__col">
<a href="https://staynavi.direct/campaign/gototravel/?facility_id=280177" target="_blank"><img
src="http://yamamotokan.com/wp/wp-content/uploads/2020/08/[email protected]" width="200" alt="goto"></a>
<p class="p-info__text">
<?php echo nl2br(esc_html($dp_options['footer_reservation_desc'])); ?>
</p>
<?php if ($dp_options['footer_reservation_btn_label']): ?>
<a class="p-info__btn p-btn" href="<?php echo esc_url($dp_options['footer_reservation_btn_url']); ?>" <?php if ($dp_options['footer_reservation_btn_target']) {
echo ' target="_blank"';
} ?>><?php echo esc_html($dp_options['footer_reservation_btn_label']); ?></a>
<?php endif; ?>
</div><!-- /.p-info__col -->
<?php endif; ?>
</div><!-- /.p-info__inner -->
</div><!-- /.p-info -->
<?php endif; ?>
<?php wp_nav_menu($menu_args); ?>
<p class="p-copyright">
<small>Copyright ©
<?php bloginfo('name'); ?> All Rights Reserved.
</small>
</p>
<div id="js-pagetop" class="p-pagetop"><a href="#"></a></div>
</footer>
<?php wp_footer(); ?>
</body>
</html>