-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfooter.php
More file actions
115 lines (104 loc) · 4.71 KB
/
Copy pathfooter.php
File metadata and controls
115 lines (104 loc) · 4.71 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
</div>
<?php
$layout = backbone_get_layout();
$is_full_width = !backbone_has_sidebar();
?>
<?php if (!$is_full_width) : ?>
<?php if (backbone_is_three_columns()) : ?>
<aside class="sidebar sidebar-2">
<?php if (is_active_sidebar('sidebar-2')) : ?>
<?php dynamic_sidebar('sidebar-2'); ?>
<?php else : ?>
<div class="widget">
<h3 class="widget-title"><?php _e('サイドバー2', 'backbone-seo-llmo'); ?></h3>
<p><?php _e('ウィジェットエリアです。管理画面の「外観 > ウィジェット」からコンテンツを追加してください。', 'backbone-seo-llmo'); ?></p>
</div>
<?php endif; ?>
</aside>
<?php elseif (backbone_is_two_columns()) : ?>
<aside class="sidebar sidebar-1">
<?php if (is_active_sidebar('sidebar-1')) : ?>
<?php dynamic_sidebar('sidebar-1'); ?>
<?php else : ?>
<div class="widget">
<h3 class="widget-title"><?php _e('サイドバー1', 'backbone-seo-llmo'); ?></h3>
<p><?php _e('ウィジェットエリアです。管理画面の「外観 > ウィジェット」からコンテンツを追加してください。', 'backbone-seo-llmo'); ?></p>
</div>
<?php endif; ?>
</aside>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
</main>
<footer class="site-footer">
<div class="container">
<?php
if (is_active_sidebar('footer-widgets')) :
// ウィジェットの内容を取得して空かどうかチェック
ob_start();
dynamic_sidebar('footer-widgets');
$widget_content = ob_get_clean();
// 空のHTMLタグのみの場合は出力しない
$cleaned_content = trim(strip_tags($widget_content));
if (!empty($cleaned_content)) :
?>
<div class="footer-widgets">
<?php echo $widget_content; ?>
</div>
<?php
endif;
endif;
?>
<?php
// サブディレクトリ対応のフッターメッセージを取得
if (function_exists('backbone_get_footer_message')) {
$footer_message = backbone_get_footer_message();
} else {
$footer_message = get_theme_mod('footer_message');
}
if ($footer_message) :
?>
<div class="footer-message">
<?php echo wp_kses_post($footer_message); ?>
</div>
<?php endif; ?>
<div class="footer-content">
<?php
wp_nav_menu(array(
'theme_location' => 'footer',
'menu_id' => 'footer-menu',
'container' => 'nav',
'container_class' => 'footer-navigation',
'depth' => 1,
'fallback_cb' => false,
));
?>
<?php if (get_theme_mod('footer_copyright_show', true)) : ?>
<p class="site-info">
<?php
$copyright = get_theme_mod('footer_copyright_text', sprintf(__('© %s %s. All rights reserved.', 'backbone-seo-llmo'), date('Y'), get_bloginfo('name')));
echo esc_html($copyright);
?>
</p>
<?php endif; ?>
<?php if (get_theme_mod('footer_credit_show', true)) : ?>
<p class="powered-by">
<span>WP Theme: </span>
<a href="https://github.com/TsuyoshiKashiwazaki/wp-theme-backbone-seo-llmo" target="_blank" rel="noopener">
Backbone Theme for SEO + LLMO
</a>
<span class="sep"> | </span>
<span>Creator: </span>
<a href="https://www.tsuyoshikashiwazaki.jp/profile/" target="_blank" rel="noopener">
柏崎剛
</a>
</p>
<?php endif; ?>
</div>
</div>
</footer>
</div>
<?php wp_footer(); ?>
</body>
</html>