質問編集履歴
1
phpでテーマを追記しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -13,3 +13,111 @@
|
|
13
13
|
わかる方がいれば教えて下さい。
|
14
14
|
|
15
15
|
[https://demo.tcd-theme.com/tcd063/](https://demo.tcd-theme.com/tcd063/)
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
```php
|
20
|
+
|
21
|
+
<?php $dp_options = get_design_plus_options(); ?>
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
<?php if ( 'type1' === $dp_options['header_content_type'] ) : // Image ?>
|
26
|
+
|
27
|
+
<div id="js-header-slider" class="p-header-slider" data-speed="<?php echo esc_attr( $dp_options['header_slider_animation_time'] * 1000 ); ?>">
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
<?php
|
32
|
+
|
33
|
+
for ( $i = 1; $i <= 5; $i++ ) :
|
34
|
+
|
35
|
+
if ( ! $dp_options['header_slider_img' . $i] ) continue;
|
36
|
+
|
37
|
+
?>
|
38
|
+
|
39
|
+
<div class="p-header-slider__item p-header-slider__item--<?php echo esc_attr( $i ); ?> p-header-content">
|
40
|
+
|
41
|
+
<div class="p-header-content__inner">
|
42
|
+
|
43
|
+
<div class="p-header-content__title<?php if ( 'type1' === $dp_options['header_slider_catch_writing_mode' . $i] ) { echo ' p-header-content__title--vertical'; } ?>">
|
44
|
+
|
45
|
+
<span><?php echo nl2br( esc_html( $dp_options['header_slider_catch' . $i] ) ); ?></span>
|
46
|
+
|
47
|
+
</div>
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div class="p-header-slider__item-img p-header-slider__item-img--<?php echo esc_attr( $dp_options['header_slider_img_animation_type' . $i] ); ?>" data-animation="<?php if ( 'type3' !== $dp_options['header_slider_img_animation_type' . $i] ) { echo '1'; } ?>"></div>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<?php endfor; ?>
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
</div>
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
<?php elseif ( 'type2' === $dp_options['header_content_type'] ) : // Video ?>
|
64
|
+
|
65
|
+
<div id="js-header-video" class="p-header-video p-header-content is-active">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<?php if ( ! wp_is_mobile() ) : ?>
|
70
|
+
|
71
|
+
<video autoplay loop muted>
|
72
|
+
|
73
|
+
<source src="<?php echo esc_attr( wp_get_attachment_url( $dp_options['header_video'] ) ); ?>">
|
74
|
+
|
75
|
+
</video>
|
76
|
+
|
77
|
+
<?php endif; ?>
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div class="p-header-content__inner">
|
82
|
+
|
83
|
+
<div class="p-header-content__title<?php if ( 'type1' === $dp_options['header_video_catch_writing_mode'] ) { echo ' p-header-content__title--vertical'; } ?>">
|
84
|
+
|
85
|
+
<span><?php echo nl2br( esc_html( $dp_options['header_video_catch'] ) ); ?></span>
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<?php elseif ( 'type3' === $dp_options['header_content_type'] ) : // YouTube ?>
|
96
|
+
|
97
|
+
<div id="js-header-youtube" class="p-header-youtube p-header-content is-active">
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
<?php if ( ! wp_is_mobile() ) : ?>
|
102
|
+
|
103
|
+
<div id="js-header-youtube__player" class="p-header-youtube__player" data-video-id="<?php echo esc_attr( $dp_options['header_youtube_id'] ); ?>"></div>
|
104
|
+
|
105
|
+
<?php endif; ?>
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
<div class="p-header-content__inner">
|
110
|
+
|
111
|
+
<div class="p-header-content__title<?php if ( 'type1' === $dp_options['header_youtube_catch_writing_mode'] ) { echo ' p-header-content__title--vertical'; } ?>">
|
112
|
+
|
113
|
+
<span><?php echo nl2br( esc_html( $dp_options['header_youtube_catch'] ) ); ?></span>
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
</div>
|
118
|
+
|
119
|
+
</div>
|
120
|
+
|
121
|
+
<?php endif; ?>
|
122
|
+
|
123
|
+
```
|