質問編集履歴
8
インデント修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -294,23 +294,23 @@
|
|
294
294
|
|
295
295
|
```js
|
296
296
|
|
297
|
-
jQuery(function(){
|
297
|
+
jQuery(function () {
|
298
|
-
|
298
|
+
|
299
|
-
|
299
|
+
jQuery('.NEWS-list2').on("click", function () {
|
300
|
-
|
300
|
+
|
301
|
-
|
301
|
+
jQuery('.center-news-logo').fadeIn(1500);
|
302
|
-
|
302
|
+
|
303
|
-
|
303
|
+
jQuery('.left-post-list,.left-news-list').remove();
|
304
|
-
|
304
|
+
|
305
|
-
|
305
|
+
jQuery(document).on('click', '.NEWS-list', function () {
|
306
|
-
|
306
|
+
|
307
|
-
|
307
|
+
jQuery('.center-news-logo').hide(1500);
|
308
|
-
|
308
|
+
|
309
|
-
|
309
|
+
jQuery('.left-post-list,.left-news-list').append();
|
310
|
-
|
310
|
+
|
311
|
-
|
311
|
+
});
|
312
|
-
|
312
|
+
|
313
|
-
|
313
|
+
});
|
314
314
|
|
315
315
|
});
|
316
316
|
|
7
インデントをつけた
test
CHANGED
File without changes
|
test
CHANGED
@@ -292,7 +292,31 @@
|
|
292
292
|
|
293
293
|
```
|
294
294
|
|
295
|
-
|
295
|
+
```js
|
296
|
+
|
297
|
+
jQuery(function(){
|
298
|
+
|
299
|
+
jQuery('.NEWS-list2').on("click",function(){
|
300
|
+
|
301
|
+
jQuery('.center-news-logo').fadeIn(1500);
|
302
|
+
|
303
|
+
jQuery('.left-post-list,.left-news-list').remove();
|
304
|
+
|
305
|
+
jQuery(document).on('click', '.NEWS-list', function(){
|
306
|
+
|
307
|
+
jQuery('.center-news-logo').hide(1500);
|
308
|
+
|
309
|
+
jQuery('.left-post-list,.left-news-list').append();
|
310
|
+
|
311
|
+
});
|
312
|
+
|
313
|
+
});
|
314
|
+
|
315
|
+
});
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
```
|
296
320
|
|
297
321
|
|
298
322
|
|
6
インデントをつけた
test
CHANGED
File without changes
|
test
CHANGED
@@ -26,298 +26,274 @@
|
|
26
26
|
|
27
27
|
<?php get_header(); ?>
|
28
28
|
|
29
|
-
<main>
|
30
|
-
|
31
|
-
<div id="home">
|
32
|
-
|
33
|
-
<div class="left-home">
|
34
|
-
|
35
|
-
<img src="<?php echo get_template_directory_uri();
|
36
|
-
|
37
|
-
?>/img/image1.png" alt="">
|
38
|
-
|
39
|
-
<div class="left-home-item">
|
40
|
-
|
41
|
-
<h1>ホーム</h1>
|
42
|
-
|
43
|
-
<p>Home</p>
|
44
|
-
|
45
|
-
</div>
|
46
|
-
|
47
|
-
<div class="left-home-item2">
|
48
|
-
|
49
|
-
<p>PADIライセンス所得ならC</p>
|
50
|
-
|
51
|
-
</div>
|
52
|
-
|
53
|
-
</div>
|
54
|
-
|
55
|
-
<div class="right-home">
|
56
|
-
|
57
|
-
<img src="<?php echo get_template_directory_uri();
|
58
|
-
|
59
|
-
?>/img/image4.png" alt="">
|
60
|
-
|
61
|
-
<h1>無料のお問合せ</h1>
|
62
|
-
|
63
|
-
</div>
|
64
|
-
|
65
|
-
</div>
|
66
|
-
|
67
|
-
<div id="main-home">
|
68
|
-
|
69
|
-
<div class="home-slido">
|
70
|
-
|
71
|
-
<?php
|
72
|
-
|
73
|
-
$スライド_query = new WP_Query(
|
74
|
-
|
75
|
-
array(
|
76
|
-
|
77
|
-
'post_type' => 'post',
|
78
|
-
|
79
|
-
'category_name' => 'スライド',
|
80
|
-
|
81
|
-
'posts_per_page' => 4,
|
82
|
-
|
83
|
-
)
|
84
|
-
|
85
|
-
);
|
86
|
-
|
87
|
-
?>
|
88
|
-
|
89
|
-
<?php
|
90
|
-
|
91
|
-
if ( $スライド_query->have_posts()
|
92
|
-
|
93
|
-
) : ?>
|
94
|
-
|
95
|
-
<?php while (
|
96
|
-
|
97
|
-
$スライド_query->have_posts() ) : ?>
|
98
|
-
|
99
|
-
<?php $スライド_query->the_post(); ?>
|
100
|
-
|
101
|
-
<div class="home-content">
|
102
|
-
|
103
|
-
<?php the_content(); ?>
|
104
|
-
|
105
|
-
<?php endwhile; ?>
|
106
|
-
|
107
|
-
<?php endif; ?>
|
108
|
-
|
109
|
-
<?php wp_reset_postdata(); ?>
|
110
|
-
|
111
|
-
</div>
|
112
|
-
|
113
|
-
</div>
|
114
|
-
|
115
|
-
<div id="NEWS">
|
116
|
-
|
117
|
-
<div class="NEWS-title">
|
118
|
-
|
119
|
-
<h1>news</h1>
|
120
|
-
|
121
|
-
</div>
|
122
|
-
|
123
|
-
<div class="NEWS-list">
|
124
|
-
|
125
|
-
<p>全て</p>
|
126
|
-
|
127
|
-
</div>
|
128
|
-
|
129
|
-
<div class="NEWS-item1">
|
130
|
-
|
131
|
-
<div class="left-post-list">
|
132
|
-
|
133
|
-
<?php
|
134
|
-
|
135
|
-
if(have_posts()): while(have_posts()):the_post();
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
<
|
140
|
-
|
141
|
-
<
|
142
|
-
|
143
|
-
<div
|
144
|
-
|
145
|
-
<p>
|
146
|
-
|
147
|
-
</
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
<?php the_
|
152
|
-
|
153
|
-
<?php e
|
154
|
-
|
155
|
-
<?php endi
|
156
|
-
|
157
|
-
<?php
|
158
|
-
|
159
|
-
<
|
160
|
-
|
161
|
-
<div
|
162
|
-
|
163
|
-
<
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
'post
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
)
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
<
|
184
|
-
|
185
|
-
<
|
186
|
-
|
187
|
-
<div
|
188
|
-
|
189
|
-
<
|
190
|
-
|
191
|
-
</
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
<?php the_
|
196
|
-
|
197
|
-
<?php e
|
198
|
-
|
199
|
-
<?php endi
|
200
|
-
|
201
|
-
<?php
|
202
|
-
|
203
|
-
<
|
204
|
-
|
205
|
-
<div
|
206
|
-
|
207
|
-
<div class="
|
208
|
-
|
209
|
-
<
|
210
|
-
|
211
|
-
</
|
212
|
-
|
213
|
-
<
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
'post
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
)
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
<
|
232
|
-
|
233
|
-
if ( $news_query->have_posts() ) : ?>
|
234
|
-
|
235
|
-
<?php while ( $news_query->have_posts() ) : ?>
|
236
|
-
|
237
|
-
<?php $news_query->the_post(); ?>
|
238
|
-
|
239
|
-
<div class="center-news-date">
|
240
|
-
|
241
|
-
<?php echo get_the_date(); ?>
|
242
|
-
|
243
|
-
</div>
|
244
|
-
|
245
|
-
<div class="center-news-item">
|
246
|
-
|
247
|
-
<p>お知らせ</p>
|
248
|
-
|
249
|
-
</div>
|
250
|
-
|
251
|
-
<a href="<?php the_permalink(); ?>" class="center-news-title">
|
252
|
-
|
253
|
-
<?php the_title(); ?></a>
|
254
|
-
|
255
|
-
<?php endwhile; ?>
|
256
|
-
|
257
|
-
<?php endif; ?>
|
258
|
-
|
259
|
-
<?php wp_reset_postdata(); ?>
|
260
|
-
|
261
|
-
</div>
|
262
|
-
|
263
|
-
</div>
|
264
|
-
|
265
|
-
</div>
|
266
|
-
|
267
|
-
</div>
|
268
|
-
|
269
|
-
</div>
|
270
|
-
|
271
|
-
<div class="link">
|
272
|
-
|
273
|
-
<div class="next-link">
|
274
|
-
|
275
|
-
<?php next_posts_link('<img src="'. get_theme_file_uri('/img/競技.png'). '" alt=""'); ?>
|
276
|
-
|
277
|
-
</div>
|
278
|
-
|
279
|
-
<div class="previous-link">
|
280
|
-
|
281
|
-
<?php previous_posts_link('<img src="'. get_theme_file_uri('/img/競技-2.png'). '" alt=""'); ?>
|
282
|
-
|
283
|
-
</div>
|
284
|
-
|
285
|
-
</div>
|
29
|
+
<main>
|
30
|
+
|
31
|
+
<div id="home">
|
32
|
+
|
33
|
+
<div class="left-home">
|
34
|
+
|
35
|
+
<img src="<?php echo get_template_directory_uri();
|
36
|
+
|
37
|
+
?>/img/image1.png" alt="">
|
38
|
+
|
39
|
+
<div class="left-home-item">
|
40
|
+
|
41
|
+
<h1>ホーム</h1>
|
42
|
+
|
43
|
+
<p>Home</p>
|
44
|
+
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div class="left-home-item2">
|
48
|
+
|
49
|
+
<p>PADIライセンス所得ならC</p>
|
50
|
+
|
51
|
+
</div>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<div class="right-home">
|
56
|
+
|
57
|
+
<img src="<?php echo get_template_directory_uri();
|
58
|
+
|
59
|
+
?>/img/image4.png" alt="">
|
60
|
+
|
61
|
+
<h1>無料のお問合せ</h1>
|
62
|
+
|
63
|
+
</div>
|
64
|
+
|
65
|
+
</div>
|
66
|
+
|
67
|
+
<div id="main-home">
|
68
|
+
|
69
|
+
<div class="home-slido">
|
70
|
+
|
71
|
+
<?php
|
72
|
+
|
73
|
+
$スライド_query = new WP_Query(
|
74
|
+
|
75
|
+
array(
|
76
|
+
|
77
|
+
'post_type' => 'post',
|
78
|
+
|
79
|
+
'category_name' => 'スライド',
|
80
|
+
|
81
|
+
'posts_per_page' => 4,
|
82
|
+
|
83
|
+
)
|
84
|
+
|
85
|
+
);
|
86
|
+
|
87
|
+
?>
|
88
|
+
|
89
|
+
<?php
|
90
|
+
|
91
|
+
if ( $スライド_query->have_posts()
|
92
|
+
|
93
|
+
) : ?>
|
94
|
+
|
95
|
+
<?php while (
|
96
|
+
|
97
|
+
$スライド_query->have_posts() ) : ?>
|
98
|
+
|
99
|
+
<?php $スライド_query->the_post(); ?>
|
100
|
+
|
101
|
+
<div class="home-content">
|
102
|
+
|
103
|
+
<?php the_content(); ?>
|
104
|
+
|
105
|
+
<?php endwhile; ?>
|
106
|
+
|
107
|
+
<?php endif; ?>
|
108
|
+
|
109
|
+
<?php wp_reset_postdata(); ?>
|
110
|
+
|
111
|
+
</div>
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
<div id="NEWS">
|
116
|
+
|
117
|
+
<div class="NEWS-title">
|
118
|
+
|
119
|
+
<h1>news</h1>
|
120
|
+
|
121
|
+
</div>
|
122
|
+
|
123
|
+
<div class="NEWS-list">
|
124
|
+
|
125
|
+
<p>全て</p>
|
126
|
+
|
127
|
+
</div>
|
128
|
+
|
129
|
+
<div class="NEWS-item1">
|
130
|
+
|
131
|
+
<div class="left-post-list">
|
132
|
+
|
133
|
+
<?php
|
134
|
+
|
135
|
+
if(have_posts()): while(have_posts()):the_post();
|
136
|
+
|
137
|
+
?>
|
138
|
+
|
139
|
+
<div class="left-post-date">
|
140
|
+
|
141
|
+
<?php echo get_the_date(); ?>
|
142
|
+
|
143
|
+
</div>
|
144
|
+
|
145
|
+
<div class="left-post-item">
|
146
|
+
|
147
|
+
<p>ブログ</p>
|
148
|
+
|
149
|
+
</div>
|
150
|
+
|
151
|
+
<a href="<?php the_permalink(); ?>" class="left-post-title">
|
152
|
+
|
153
|
+
<?php the_title(); ?></a>
|
154
|
+
|
155
|
+
<?php endwhile; ?>
|
156
|
+
|
157
|
+
<?php endif; ?>
|
158
|
+
|
159
|
+
<?php wp_reset_postdata(); ?>
|
160
|
+
|
161
|
+
</div>
|
162
|
+
|
163
|
+
<div class="left-news-list">
|
164
|
+
|
165
|
+
<?php
|
166
|
+
|
167
|
+
$posts = new WP_Query(
|
168
|
+
|
169
|
+
array(
|
170
|
+
|
171
|
+
'post_type' => 'news',
|
172
|
+
|
173
|
+
'posts_per_page' => 1
|
174
|
+
|
175
|
+
)
|
176
|
+
|
177
|
+
);
|
178
|
+
|
179
|
+
if ( have_posts() ) : while ( $posts->have_posts() ) : $posts->the_post();
|
180
|
+
|
181
|
+
?>
|
182
|
+
|
183
|
+
<div class="left-news-date">
|
184
|
+
|
185
|
+
<?php echo get_the_date(); ?>
|
186
|
+
|
187
|
+
</div>
|
188
|
+
|
189
|
+
<div class="left-news-item">
|
190
|
+
|
191
|
+
<p>お知らせ</p>
|
192
|
+
|
193
|
+
</div>
|
194
|
+
|
195
|
+
<a href="<?php the_permalink(); ?>" class="left-news-title">
|
196
|
+
|
197
|
+
<?php the_title(); ?></a>
|
198
|
+
|
199
|
+
<?php endwhile; ?>
|
200
|
+
|
201
|
+
<?php endif; ?>
|
202
|
+
|
203
|
+
<?php wp_reset_postdata(); ?>
|
204
|
+
|
205
|
+
</div>
|
206
|
+
|
207
|
+
<div class="center-news-list">
|
208
|
+
|
209
|
+
<div class="NEWS-list2">
|
210
|
+
|
211
|
+
<p>お知らせ</p>
|
212
|
+
|
213
|
+
</div>
|
214
|
+
|
215
|
+
<?php
|
216
|
+
|
217
|
+
$news_query = new WP_Query(
|
218
|
+
|
219
|
+
array(
|
220
|
+
|
221
|
+
'post_type' => 'news',
|
222
|
+
|
223
|
+
'posts_per_page' => 3
|
224
|
+
|
225
|
+
)
|
226
|
+
|
227
|
+
);
|
228
|
+
|
229
|
+
?>
|
230
|
+
|
231
|
+
<div class="center-news-logo">
|
232
|
+
|
233
|
+
<?php if ( $news_query->have_posts() ) : ?>
|
234
|
+
|
235
|
+
<?php while ( $news_query->have_posts() ) : ?>
|
236
|
+
|
237
|
+
<?php $news_query->the_post(); ?>
|
238
|
+
|
239
|
+
<div class="center-news-date">
|
240
|
+
|
241
|
+
<?php echo get_the_date(); ?>
|
242
|
+
|
243
|
+
</div>
|
244
|
+
|
245
|
+
<div class="center-news-item">
|
246
|
+
|
247
|
+
<p>お知らせ</p>
|
248
|
+
|
249
|
+
</div>
|
250
|
+
|
251
|
+
<a href="<?php the_permalink(); ?>" class="center-news-title">
|
252
|
+
|
253
|
+
<?php the_title(); ?></a>
|
254
|
+
|
255
|
+
<?php endwhile; ?>
|
256
|
+
|
257
|
+
<?php endif; ?>
|
258
|
+
|
259
|
+
<?php wp_reset_postdata(); ?>
|
260
|
+
|
261
|
+
</div>
|
262
|
+
|
263
|
+
</div>
|
264
|
+
|
265
|
+
</div>
|
266
|
+
|
267
|
+
</div>
|
268
|
+
|
269
|
+
</div>
|
270
|
+
|
271
|
+
<div class="link">
|
272
|
+
|
273
|
+
<div class="next-link">
|
274
|
+
|
275
|
+
<?php next_posts_link('<img src="'. get_theme_file_uri('/img/競技.png'). '" alt=""'); ?>
|
276
|
+
|
277
|
+
</div>
|
278
|
+
|
279
|
+
<div class="previous-link">
|
280
|
+
|
281
|
+
<?php previous_posts_link('<img src="'. get_theme_file_uri('/img/競技-2.png'). '" alt=""'); ?>
|
282
|
+
|
283
|
+
</div>
|
284
|
+
|
285
|
+
</div>
|
286
286
|
|
287
287
|
</main>
|
288
288
|
|
289
|
+
<?php get_footer(); ?>
|
290
|
+
|
291
|
+
|
292
|
+
|
289
293
|
```
|
290
294
|
|
291
295
|
|
292
296
|
|
293
|
-
```js
|
294
|
-
|
295
|
-
jQuery(function(){
|
296
|
-
|
297
|
-
jQuery('.NEWS-list2').on("click",function(){
|
298
|
-
|
299
|
-
jQuery('.center-news-logo').fadeIn(1500);
|
300
|
-
|
301
|
-
jQuery('.left-post-list,.left-news-list').remove();
|
302
|
-
|
303
|
-
jQuery(document).on('click', '.NEWS-list', function(){
|
304
|
-
|
305
|
-
jQuery('.center-news-logo').hide(1500);
|
306
|
-
|
307
|
-
jQuery('.left-post-list,.left-news-list').append();
|
308
|
-
|
309
|
-
});
|
310
|
-
|
311
|
-
});
|
312
|
-
|
313
|
-
});
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
```
|
318
|
-
|
319
|
-
|
320
|
-
|
321
297
|
|
322
298
|
|
323
299
|
### 試したこと
|
5
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,6 +18,10 @@
|
|
18
18
|
|
19
19
|
エラーメッセージ
|
20
20
|
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
21
25
|
```php
|
22
26
|
|
23
27
|
<?php get_header(); ?>
|
@@ -282,7 +286,11 @@
|
|
282
286
|
|
283
287
|
</main>
|
284
288
|
|
289
|
+
```
|
290
|
+
|
291
|
+
|
292
|
+
|
285
|
-
```j
|
293
|
+
```js
|
286
294
|
|
287
295
|
jQuery(function(){
|
288
296
|
|
4
コードボタンを使った
test
CHANGED
File without changes
|
test
CHANGED
@@ -282,7 +282,7 @@
|
|
282
282
|
|
283
283
|
</main>
|
284
284
|
|
285
|
-
|
285
|
+
```jQuery
|
286
286
|
|
287
287
|
jQuery(function(){
|
288
288
|
|
@@ -306,22 +306,12 @@
|
|
306
306
|
|
307
307
|
|
308
308
|
|
309
|
-
|
310
|
-
|
311
|
-
これが、phpのソースコードです。
|
312
|
-
|
313
309
|
```
|
314
310
|
|
315
311
|
|
316
312
|
|
317
313
|
|
318
314
|
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
315
|
### 試したこと
|
326
316
|
|
327
317
|
NEWS=list2の方は、クリックイベントはうまく行ってます。
|
3
コードボタン使った
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,314 +18,304 @@
|
|
18
18
|
|
19
19
|
エラーメッセージ
|
20
20
|
|
21
|
+
```php
|
22
|
+
|
23
|
+
<?php get_header(); ?>
|
24
|
+
|
25
|
+
<main>
|
26
|
+
|
27
|
+
<div id="home">
|
28
|
+
|
29
|
+
<div class="left-home">
|
30
|
+
|
31
|
+
<img src="<?php echo get_template_directory_uri();
|
32
|
+
|
33
|
+
?>/img/image1.png" alt="">
|
34
|
+
|
35
|
+
<div class="left-home-item">
|
36
|
+
|
37
|
+
<h1>ホーム</h1>
|
38
|
+
|
39
|
+
<p>Home</p>
|
40
|
+
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div class="left-home-item2">
|
44
|
+
|
45
|
+
<p>PADIライセンス所得ならC</p>
|
46
|
+
|
47
|
+
</div>
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div class="right-home">
|
52
|
+
|
53
|
+
<img src="<?php echo get_template_directory_uri();
|
54
|
+
|
55
|
+
?>/img/image4.png" alt="">
|
56
|
+
|
57
|
+
<h1>無料のお問合せ</h1>
|
58
|
+
|
59
|
+
</div>
|
60
|
+
|
61
|
+
</div>
|
62
|
+
|
63
|
+
<div id="main-home">
|
64
|
+
|
65
|
+
<div class="home-slido">
|
66
|
+
|
67
|
+
<?php
|
68
|
+
|
69
|
+
$スライド_query = new WP_Query(
|
70
|
+
|
71
|
+
array(
|
72
|
+
|
73
|
+
'post_type' => 'post',
|
74
|
+
|
75
|
+
'category_name' => 'スライド',
|
76
|
+
|
77
|
+
'posts_per_page' => 4,
|
78
|
+
|
79
|
+
)
|
80
|
+
|
81
|
+
);
|
82
|
+
|
83
|
+
?>
|
84
|
+
|
85
|
+
<?php
|
86
|
+
|
87
|
+
if ( $スライド_query->have_posts()
|
88
|
+
|
89
|
+
) : ?>
|
90
|
+
|
91
|
+
<?php while (
|
92
|
+
|
93
|
+
$スライド_query->have_posts() ) : ?>
|
94
|
+
|
95
|
+
<?php $スライド_query->the_post(); ?>
|
96
|
+
|
97
|
+
<div class="home-content">
|
98
|
+
|
99
|
+
<?php the_content(); ?>
|
100
|
+
|
101
|
+
<?php endwhile; ?>
|
102
|
+
|
103
|
+
<?php endif; ?>
|
104
|
+
|
105
|
+
<?php wp_reset_postdata(); ?>
|
106
|
+
|
107
|
+
</div>
|
108
|
+
|
109
|
+
</div>
|
110
|
+
|
111
|
+
<div id="NEWS">
|
112
|
+
|
113
|
+
<div class="NEWS-title">
|
114
|
+
|
115
|
+
<h1>news</h1>
|
116
|
+
|
117
|
+
</div>
|
118
|
+
|
119
|
+
<div class="NEWS-list">
|
120
|
+
|
121
|
+
<p>全て</p>
|
122
|
+
|
123
|
+
</div>
|
124
|
+
|
125
|
+
<div class="NEWS-item1">
|
126
|
+
|
127
|
+
<div class="left-post-list">
|
128
|
+
|
129
|
+
<?php
|
130
|
+
|
131
|
+
if(have_posts()): while(have_posts()):the_post(); ?>
|
132
|
+
|
133
|
+
<div class="left-post-date">
|
134
|
+
|
135
|
+
<?php echo get_the_date(); ?>
|
136
|
+
|
137
|
+
</div>
|
138
|
+
|
139
|
+
<div class="left-post-item">
|
140
|
+
|
141
|
+
<p>ブログ</p>
|
142
|
+
|
143
|
+
</div>
|
144
|
+
|
145
|
+
<a href="<?php the_permalink(); ?>" class="left-post-title">
|
146
|
+
|
147
|
+
<?php the_title(); ?></a>
|
148
|
+
|
149
|
+
<?php endwhile; ?>
|
150
|
+
|
151
|
+
<?php endif; ?>
|
152
|
+
|
153
|
+
<?php wp_reset_postdata(); ?>
|
154
|
+
|
155
|
+
</div>
|
156
|
+
|
157
|
+
<div class="left-news-list">
|
158
|
+
|
159
|
+
<?php
|
160
|
+
|
161
|
+
$posts = new WP_Query(
|
162
|
+
|
163
|
+
array(
|
164
|
+
|
165
|
+
'post_type' => 'news',
|
166
|
+
|
167
|
+
'posts_per_page' => 1
|
168
|
+
|
169
|
+
)
|
170
|
+
|
171
|
+
);
|
172
|
+
|
173
|
+
if ( have_posts() ) : while ( $posts->have_posts() ) : $posts->the_post();
|
174
|
+
|
175
|
+
?>
|
176
|
+
|
177
|
+
<div class="left-news-date">
|
178
|
+
|
179
|
+
<?php echo get_the_date(); ?>
|
180
|
+
|
181
|
+
</div>
|
182
|
+
|
183
|
+
<div class="left-news-item">
|
184
|
+
|
185
|
+
<p>お知らせ</p>
|
186
|
+
|
187
|
+
</div>
|
188
|
+
|
189
|
+
<a href="<?php the_permalink(); ?>" class="left-news-title">
|
190
|
+
|
191
|
+
<?php the_title(); ?></a>
|
192
|
+
|
193
|
+
<?php endwhile; ?>
|
194
|
+
|
195
|
+
<?php endif; ?>
|
196
|
+
|
197
|
+
<?php wp_reset_postdata(); ?>
|
198
|
+
|
199
|
+
</div>
|
200
|
+
|
201
|
+
<div class="center-news-list">
|
202
|
+
|
203
|
+
<div class="NEWS-list2">
|
204
|
+
|
205
|
+
<p>お知らせ</p>
|
206
|
+
|
207
|
+
</div>
|
208
|
+
|
209
|
+
<?php
|
210
|
+
|
211
|
+
$news_query = new WP_Query(
|
212
|
+
|
213
|
+
array(
|
214
|
+
|
215
|
+
'post_type' => 'news',
|
216
|
+
|
217
|
+
'posts_per_page' => 3
|
218
|
+
|
219
|
+
)
|
220
|
+
|
221
|
+
);
|
222
|
+
|
223
|
+
?>
|
224
|
+
|
225
|
+
<div class="center-news-logo">
|
226
|
+
|
227
|
+
<?php
|
228
|
+
|
229
|
+
if ( $news_query->have_posts() ) : ?>
|
230
|
+
|
231
|
+
<?php while ( $news_query->have_posts() ) : ?>
|
232
|
+
|
233
|
+
<?php $news_query->the_post(); ?>
|
234
|
+
|
235
|
+
<div class="center-news-date">
|
236
|
+
|
237
|
+
<?php echo get_the_date(); ?>
|
238
|
+
|
239
|
+
</div>
|
240
|
+
|
241
|
+
<div class="center-news-item">
|
242
|
+
|
243
|
+
<p>お知らせ</p>
|
244
|
+
|
245
|
+
</div>
|
246
|
+
|
247
|
+
<a href="<?php the_permalink(); ?>" class="center-news-title">
|
248
|
+
|
249
|
+
<?php the_title(); ?></a>
|
250
|
+
|
251
|
+
<?php endwhile; ?>
|
252
|
+
|
253
|
+
<?php endif; ?>
|
254
|
+
|
255
|
+
<?php wp_reset_postdata(); ?>
|
256
|
+
|
257
|
+
</div>
|
258
|
+
|
259
|
+
</div>
|
260
|
+
|
261
|
+
</div>
|
262
|
+
|
263
|
+
</div>
|
264
|
+
|
265
|
+
</div>
|
266
|
+
|
267
|
+
<div class="link">
|
268
|
+
|
269
|
+
<div class="next-link">
|
270
|
+
|
271
|
+
<?php next_posts_link('<img src="'. get_theme_file_uri('/img/競技.png'). '" alt=""'); ?>
|
272
|
+
|
273
|
+
</div>
|
274
|
+
|
275
|
+
<div class="previous-link">
|
276
|
+
|
277
|
+
<?php previous_posts_link('<img src="'. get_theme_file_uri('/img/競技-2.png'). '" alt=""'); ?>
|
278
|
+
|
279
|
+
</div>
|
280
|
+
|
281
|
+
</div>
|
282
|
+
|
283
|
+
</main>
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
jQuery(function(){
|
288
|
+
|
289
|
+
jQuery('.NEWS-list2').on("click",function(){
|
290
|
+
|
291
|
+
jQuery('.center-news-logo').fadeIn(1500);
|
292
|
+
|
293
|
+
jQuery('.left-post-list,.left-news-list').remove();
|
294
|
+
|
295
|
+
jQuery(document).on('click', '.NEWS-list', function(){
|
296
|
+
|
297
|
+
jQuery('.center-news-logo').hide(1500);
|
298
|
+
|
299
|
+
jQuery('.left-post-list,.left-news-list').append();
|
300
|
+
|
301
|
+
});
|
302
|
+
|
303
|
+
});
|
304
|
+
|
305
|
+
});
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
これが、phpのソースコードです。
|
312
|
+
|
21
313
|
```
|
22
314
|
|
23
315
|
|
24
316
|
|
25
317
|
|
26
318
|
|
27
|
-
これが、phpのソースコードです。
|
28
|
-
|
29
|
-
```php
|
30
|
-
|
31
|
-
<?php get_header(); ?>
|
32
|
-
|
33
|
-
<main>
|
34
|
-
|
35
|
-
<div id="home">
|
36
|
-
|
37
|
-
<div class="left-home">
|
38
|
-
|
39
|
-
<img src="<?php echo get_template_directory_uri();
|
40
|
-
|
41
|
-
?>/img/image1.png" alt="">
|
42
|
-
|
43
|
-
<div class="left-home-item">
|
44
|
-
|
45
|
-
<h1>ホーム</h1>
|
46
|
-
|
47
|
-
<p>Home</p>
|
48
|
-
|
49
|
-
</div>
|
50
|
-
|
51
|
-
<div class="left-home-item2">
|
52
|
-
|
53
|
-
<p>PADIライセンス所得ならC</p>
|
54
|
-
|
55
|
-
</div>
|
56
|
-
|
57
|
-
</div>
|
58
|
-
|
59
|
-
<div class="right-home">
|
60
|
-
|
61
|
-
<img src="<?php echo get_template_directory_uri();
|
62
|
-
|
63
|
-
?>/img/image4.png" alt="">
|
64
|
-
|
65
|
-
<h1>無料のお問合せ</h1>
|
66
|
-
|
67
|
-
</div>
|
68
|
-
|
69
|
-
</div>
|
70
|
-
|
71
|
-
<div id="main-home">
|
72
|
-
|
73
|
-
<div class="home-slido">
|
74
|
-
|
75
|
-
<?php
|
76
|
-
|
77
|
-
$スライド_query = new WP_Query(
|
78
|
-
|
79
|
-
array(
|
80
|
-
|
81
|
-
'post_type' => 'post',
|
82
|
-
|
83
|
-
'category_name' => 'スライド',
|
84
|
-
|
85
|
-
'posts_per_page' => 4,
|
86
|
-
|
87
|
-
)
|
88
|
-
|
89
|
-
);
|
90
|
-
|
91
|
-
?>
|
92
|
-
|
93
|
-
<?php
|
94
|
-
|
95
|
-
if ( $スライド_query->have_posts()
|
96
|
-
|
97
|
-
) : ?>
|
98
|
-
|
99
|
-
<?php while (
|
100
|
-
|
101
|
-
$スライド_query->have_posts() ) : ?>
|
102
|
-
|
103
|
-
<?php $スライド_query->the_post(); ?>
|
104
|
-
|
105
|
-
<div class="home-content">
|
106
|
-
|
107
|
-
<?php the_content(); ?>
|
108
|
-
|
109
|
-
<?php endwhile; ?>
|
110
|
-
|
111
|
-
<?php endif; ?>
|
112
|
-
|
113
|
-
<?php wp_reset_postdata(); ?>
|
114
|
-
|
115
|
-
</div>
|
116
|
-
|
117
|
-
</div>
|
118
|
-
|
119
|
-
<div id="NEWS">
|
120
|
-
|
121
|
-
<div class="NEWS-title">
|
122
|
-
|
123
|
-
<h1>news</h1>
|
124
|
-
|
125
|
-
</div>
|
126
|
-
|
127
|
-
<div class="NEWS-list">
|
128
|
-
|
129
|
-
<p>全て</p>
|
130
|
-
|
131
|
-
</div>
|
132
|
-
|
133
|
-
<div class="NEWS-item1">
|
134
|
-
|
135
|
-
<div class="left-post-list">
|
136
|
-
|
137
|
-
<?php
|
138
|
-
|
139
|
-
if(have_posts()): while(have_posts()):the_post(); ?>
|
140
|
-
|
141
|
-
<div class="left-post-date">
|
142
|
-
|
143
|
-
<?php echo get_the_date(); ?>
|
144
|
-
|
145
|
-
</div>
|
146
|
-
|
147
|
-
<div class="left-post-item">
|
148
|
-
|
149
|
-
<p>ブログ</p>
|
150
|
-
|
151
|
-
</div>
|
152
|
-
|
153
|
-
<a href="<?php the_permalink(); ?>" class="left-post-title">
|
154
|
-
|
155
|
-
<?php the_title(); ?></a>
|
156
|
-
|
157
|
-
<?php endwhile; ?>
|
158
|
-
|
159
|
-
<?php endif; ?>
|
160
|
-
|
161
|
-
<?php wp_reset_postdata(); ?>
|
162
|
-
|
163
|
-
</div>
|
164
|
-
|
165
|
-
<div class="left-news-list">
|
166
|
-
|
167
|
-
<?php
|
168
|
-
|
169
|
-
$posts = new WP_Query(
|
170
|
-
|
171
|
-
array(
|
172
|
-
|
173
|
-
'post_type' => 'news',
|
174
|
-
|
175
|
-
'posts_per_page' => 1
|
176
|
-
|
177
|
-
)
|
178
|
-
|
179
|
-
);
|
180
|
-
|
181
|
-
if ( have_posts() ) : while ( $posts->have_posts() ) : $posts->the_post();
|
182
|
-
|
183
|
-
?>
|
184
|
-
|
185
|
-
<div class="left-news-date">
|
186
|
-
|
187
|
-
<?php echo get_the_date(); ?>
|
188
|
-
|
189
|
-
</div>
|
190
|
-
|
191
|
-
<div class="left-news-item">
|
192
|
-
|
193
|
-
<p>お知らせ</p>
|
194
|
-
|
195
|
-
</div>
|
196
|
-
|
197
|
-
<a href="<?php the_permalink(); ?>" class="left-news-title">
|
198
|
-
|
199
|
-
<?php the_title(); ?></a>
|
200
|
-
|
201
|
-
<?php endwhile; ?>
|
202
|
-
|
203
|
-
<?php endif; ?>
|
204
|
-
|
205
|
-
<?php wp_reset_postdata(); ?>
|
206
|
-
|
207
|
-
</div>
|
208
|
-
|
209
|
-
<div class="center-news-list">
|
210
|
-
|
211
|
-
<div class="NEWS-list2">
|
212
|
-
|
213
|
-
<p>お知らせ</p>
|
214
|
-
|
215
|
-
</div>
|
216
|
-
|
217
|
-
<?php
|
218
|
-
|
219
|
-
$news_query = new WP_Query(
|
220
|
-
|
221
|
-
array(
|
222
|
-
|
223
|
-
'post_type' => 'news',
|
224
|
-
|
225
|
-
'posts_per_page' => 3
|
226
|
-
|
227
|
-
)
|
228
|
-
|
229
|
-
);
|
230
|
-
|
231
|
-
?>
|
232
|
-
|
233
|
-
<div class="center-news-logo">
|
234
|
-
|
235
|
-
<?php
|
236
|
-
|
237
|
-
if ( $news_query->have_posts() ) : ?>
|
238
|
-
|
239
|
-
<?php while ( $news_query->have_posts() ) : ?>
|
240
|
-
|
241
|
-
<?php $news_query->the_post(); ?>
|
242
|
-
|
243
|
-
<div class="center-news-date">
|
244
|
-
|
245
|
-
<?php echo get_the_date(); ?>
|
246
|
-
|
247
|
-
</div>
|
248
|
-
|
249
|
-
<div class="center-news-item">
|
250
|
-
|
251
|
-
<p>お知らせ</p>
|
252
|
-
|
253
|
-
</div>
|
254
|
-
|
255
|
-
<a href="<?php the_permalink(); ?>" class="center-news-title">
|
256
|
-
|
257
|
-
<?php the_title(); ?></a>
|
258
|
-
|
259
|
-
<?php endwhile; ?>
|
260
|
-
|
261
|
-
<?php endif; ?>
|
262
|
-
|
263
|
-
<?php wp_reset_postdata(); ?>
|
264
|
-
|
265
|
-
</div>
|
266
|
-
|
267
|
-
</div>
|
268
|
-
|
269
|
-
</div>
|
270
|
-
|
271
|
-
</div>
|
272
|
-
|
273
|
-
</div>
|
274
|
-
|
275
|
-
<div class="link">
|
276
|
-
|
277
|
-
<div class="next-link">
|
278
|
-
|
279
|
-
<?php next_posts_link('<img src="'. get_theme_file_uri('/img/競技.png'). '" alt=""'); ?>
|
280
|
-
|
281
|
-
</div>
|
282
|
-
|
283
|
-
<div class="previous-link">
|
284
|
-
|
285
|
-
<?php previous_posts_link('<img src="'. get_theme_file_uri('/img/競技-2.png'). '" alt=""'); ?>
|
286
|
-
|
287
|
-
</div>
|
288
|
-
|
289
|
-
</div>
|
290
|
-
|
291
|
-
</main>
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
これがjsのソースコードです。
|
300
|
-
|
301
|
-
jQuery(function(){
|
302
|
-
|
303
|
-
jQuery('.NEWS-list2').on("click",function(){
|
304
|
-
|
305
|
-
jQuery('.center-news-logo').fadeIn(1500);
|
306
|
-
|
307
|
-
jQuery('.left-post-list,.left-news-list').remove();
|
308
|
-
|
309
|
-
jQuery(document).on('click', '.NEWS-list', function(){
|
310
|
-
|
311
|
-
jQuery('.center-news-logo').hide(1500);
|
312
|
-
|
313
|
-
jQuery('.left-post-list,.left-news-list').append();
|
314
|
-
|
315
|
-
});
|
316
|
-
|
317
|
-
});
|
318
|
-
|
319
|
-
});
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
```
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
319
|
|
330
320
|
|
331
321
|
|
2
コード機能をつけた
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,310 +14,316 @@
|
|
14
14
|
|
15
15
|
ワードプレスを使いjqueryで、クリックイベントをやりたいのですがうまく機能しません。
|
16
16
|
|
17
|
+
ç
|
18
|
+
|
19
|
+
エラーメッセージ
|
20
|
+
|
17
21
|
```
|
18
22
|
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
これが、phpのソースコードです。
|
28
|
+
|
29
|
+
```php
|
30
|
+
|
31
|
+
<?php get_header(); ?>
|
32
|
+
|
33
|
+
<main>
|
34
|
+
|
35
|
+
<div id="home">
|
36
|
+
|
37
|
+
<div class="left-home">
|
38
|
+
|
39
|
+
<img src="<?php echo get_template_directory_uri();
|
40
|
+
|
41
|
+
?>/img/image1.png" alt="">
|
42
|
+
|
43
|
+
<div class="left-home-item">
|
44
|
+
|
45
|
+
<h1>ホーム</h1>
|
46
|
+
|
47
|
+
<p>Home</p>
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div class="left-home-item2">
|
52
|
+
|
53
|
+
<p>PADIライセンス所得ならC</p>
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<div class="right-home">
|
60
|
+
|
61
|
+
<img src="<?php echo get_template_directory_uri();
|
62
|
+
|
63
|
+
?>/img/image4.png" alt="">
|
64
|
+
|
65
|
+
<h1>無料のお問合せ</h1>
|
66
|
+
|
67
|
+
</div>
|
68
|
+
|
69
|
+
</div>
|
70
|
+
|
71
|
+
<div id="main-home">
|
72
|
+
|
73
|
+
<div class="home-slido">
|
74
|
+
|
19
|
-
|
75
|
+
<?php
|
76
|
+
|
77
|
+
$スライド_query = new WP_Query(
|
78
|
+
|
79
|
+
array(
|
80
|
+
|
81
|
+
'post_type' => 'post',
|
82
|
+
|
83
|
+
'category_name' => 'スライド',
|
84
|
+
|
85
|
+
'posts_per_page' => 4,
|
86
|
+
|
87
|
+
)
|
88
|
+
|
89
|
+
);
|
90
|
+
|
91
|
+
?>
|
92
|
+
|
93
|
+
<?php
|
94
|
+
|
95
|
+
if ( $スライド_query->have_posts()
|
96
|
+
|
97
|
+
) : ?>
|
98
|
+
|
99
|
+
<?php while (
|
100
|
+
|
101
|
+
$スライド_query->have_posts() ) : ?>
|
102
|
+
|
103
|
+
<?php $スライド_query->the_post(); ?>
|
104
|
+
|
105
|
+
<div class="home-content">
|
106
|
+
|
107
|
+
<?php the_content(); ?>
|
108
|
+
|
109
|
+
<?php endwhile; ?>
|
110
|
+
|
111
|
+
<?php endif; ?>
|
112
|
+
|
113
|
+
<?php wp_reset_postdata(); ?>
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
</div>
|
118
|
+
|
119
|
+
<div id="NEWS">
|
120
|
+
|
121
|
+
<div class="NEWS-title">
|
122
|
+
|
123
|
+
<h1>news</h1>
|
124
|
+
|
125
|
+
</div>
|
126
|
+
|
127
|
+
<div class="NEWS-list">
|
128
|
+
|
129
|
+
<p>全て</p>
|
130
|
+
|
131
|
+
</div>
|
132
|
+
|
133
|
+
<div class="NEWS-item1">
|
134
|
+
|
135
|
+
<div class="left-post-list">
|
136
|
+
|
137
|
+
<?php
|
138
|
+
|
139
|
+
if(have_posts()): while(have_posts()):the_post(); ?>
|
140
|
+
|
141
|
+
<div class="left-post-date">
|
142
|
+
|
143
|
+
<?php echo get_the_date(); ?>
|
144
|
+
|
145
|
+
</div>
|
146
|
+
|
147
|
+
<div class="left-post-item">
|
148
|
+
|
149
|
+
<p>ブログ</p>
|
150
|
+
|
151
|
+
</div>
|
152
|
+
|
153
|
+
<a href="<?php the_permalink(); ?>" class="left-post-title">
|
154
|
+
|
155
|
+
<?php the_title(); ?></a>
|
156
|
+
|
157
|
+
<?php endwhile; ?>
|
158
|
+
|
159
|
+
<?php endif; ?>
|
160
|
+
|
161
|
+
<?php wp_reset_postdata(); ?>
|
162
|
+
|
163
|
+
</div>
|
164
|
+
|
165
|
+
<div class="left-news-list">
|
166
|
+
|
167
|
+
<?php
|
168
|
+
|
169
|
+
$posts = new WP_Query(
|
170
|
+
|
171
|
+
array(
|
172
|
+
|
173
|
+
'post_type' => 'news',
|
174
|
+
|
175
|
+
'posts_per_page' => 1
|
176
|
+
|
177
|
+
)
|
178
|
+
|
179
|
+
);
|
180
|
+
|
181
|
+
if ( have_posts() ) : while ( $posts->have_posts() ) : $posts->the_post();
|
182
|
+
|
183
|
+
?>
|
184
|
+
|
185
|
+
<div class="left-news-date">
|
186
|
+
|
187
|
+
<?php echo get_the_date(); ?>
|
188
|
+
|
189
|
+
</div>
|
190
|
+
|
191
|
+
<div class="left-news-item">
|
192
|
+
|
193
|
+
<p>お知らせ</p>
|
194
|
+
|
195
|
+
</div>
|
196
|
+
|
197
|
+
<a href="<?php the_permalink(); ?>" class="left-news-title">
|
198
|
+
|
199
|
+
<?php the_title(); ?></a>
|
200
|
+
|
201
|
+
<?php endwhile; ?>
|
202
|
+
|
203
|
+
<?php endif; ?>
|
204
|
+
|
205
|
+
<?php wp_reset_postdata(); ?>
|
206
|
+
|
207
|
+
</div>
|
208
|
+
|
209
|
+
<div class="center-news-list">
|
210
|
+
|
211
|
+
<div class="NEWS-list2">
|
212
|
+
|
213
|
+
<p>お知らせ</p>
|
214
|
+
|
215
|
+
</div>
|
216
|
+
|
217
|
+
<?php
|
218
|
+
|
219
|
+
$news_query = new WP_Query(
|
220
|
+
|
221
|
+
array(
|
222
|
+
|
223
|
+
'post_type' => 'news',
|
224
|
+
|
225
|
+
'posts_per_page' => 3
|
226
|
+
|
227
|
+
)
|
228
|
+
|
229
|
+
);
|
230
|
+
|
231
|
+
?>
|
232
|
+
|
233
|
+
<div class="center-news-logo">
|
234
|
+
|
235
|
+
<?php
|
236
|
+
|
237
|
+
if ( $news_query->have_posts() ) : ?>
|
238
|
+
|
239
|
+
<?php while ( $news_query->have_posts() ) : ?>
|
240
|
+
|
241
|
+
<?php $news_query->the_post(); ?>
|
242
|
+
|
243
|
+
<div class="center-news-date">
|
244
|
+
|
245
|
+
<?php echo get_the_date(); ?>
|
246
|
+
|
247
|
+
</div>
|
248
|
+
|
249
|
+
<div class="center-news-item">
|
250
|
+
|
251
|
+
<p>お知らせ</p>
|
252
|
+
|
253
|
+
</div>
|
254
|
+
|
255
|
+
<a href="<?php the_permalink(); ?>" class="center-news-title">
|
256
|
+
|
257
|
+
<?php the_title(); ?></a>
|
258
|
+
|
259
|
+
<?php endwhile; ?>
|
260
|
+
|
261
|
+
<?php endif; ?>
|
262
|
+
|
263
|
+
<?php wp_reset_postdata(); ?>
|
264
|
+
|
265
|
+
</div>
|
266
|
+
|
267
|
+
</div>
|
268
|
+
|
269
|
+
</div>
|
270
|
+
|
271
|
+
</div>
|
272
|
+
|
273
|
+
</div>
|
274
|
+
|
275
|
+
<div class="link">
|
276
|
+
|
277
|
+
<div class="next-link">
|
278
|
+
|
279
|
+
<?php next_posts_link('<img src="'. get_theme_file_uri('/img/競技.png'). '" alt=""'); ?>
|
280
|
+
|
281
|
+
</div>
|
282
|
+
|
283
|
+
<div class="previous-link">
|
284
|
+
|
285
|
+
<?php previous_posts_link('<img src="'. get_theme_file_uri('/img/競技-2.png'). '" alt=""'); ?>
|
286
|
+
|
287
|
+
</div>
|
288
|
+
|
289
|
+
</div>
|
290
|
+
|
291
|
+
</main>
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
これがjsのソースコードです。
|
300
|
+
|
301
|
+
jQuery(function(){
|
302
|
+
|
303
|
+
jQuery('.NEWS-list2').on("click",function(){
|
304
|
+
|
305
|
+
jQuery('.center-news-logo').fadeIn(1500);
|
306
|
+
|
307
|
+
jQuery('.left-post-list,.left-news-list').remove();
|
308
|
+
|
309
|
+
jQuery(document).on('click', '.NEWS-list', function(){
|
310
|
+
|
311
|
+
jQuery('.center-news-logo').hide(1500);
|
312
|
+
|
313
|
+
jQuery('.left-post-list,.left-news-list').append();
|
314
|
+
|
315
|
+
});
|
316
|
+
|
317
|
+
});
|
318
|
+
|
319
|
+
});
|
320
|
+
|
321
|
+
|
20
322
|
|
21
323
|
```
|
22
324
|
|
23
325
|
|
24
326
|
|
25
|
-
### 該当のソースコード
|
26
|
-
|
27
|
-
これが、phpのソースコードです。
|
28
|
-
|
29
|
-
<?php get_header(); ?>
|
30
|
-
|
31
|
-
<main>
|
32
|
-
|
33
|
-
<div id="home">
|
34
|
-
|
35
|
-
<div class="left-home">
|
36
|
-
|
37
|
-
<img src="<?php echo get_template_directory_uri();
|
38
|
-
|
39
|
-
?>/img/image1.png" alt="">
|
40
|
-
|
41
|
-
<div class="left-home-item">
|
42
|
-
|
43
|
-
<h1>ホーム</h1>
|
44
|
-
|
45
|
-
<p>Home</p>
|
46
|
-
|
47
|
-
</div>
|
48
|
-
|
49
|
-
<div class="left-home-item2">
|
50
|
-
|
51
|
-
<p>PADIライセンス所得ならC</p>
|
52
|
-
|
53
|
-
</div>
|
54
|
-
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<div class="right-home">
|
58
|
-
|
59
|
-
<img src="<?php echo get_template_directory_uri();
|
60
|
-
|
61
|
-
?>/img/image4.png" alt="">
|
62
|
-
|
63
|
-
<h1>無料のお問合せ</h1>
|
64
|
-
|
65
|
-
</div>
|
66
|
-
|
67
|
-
</div>
|
68
|
-
|
69
|
-
<div id="main-home">
|
70
|
-
|
71
|
-
<div class="home-slido">
|
72
|
-
|
73
|
-
<?php
|
74
|
-
|
75
|
-
$スライド_query = new WP_Query(
|
76
|
-
|
77
|
-
array(
|
78
|
-
|
79
|
-
'post_type' => 'post',
|
80
|
-
|
81
|
-
'category_name' => 'スライド',
|
82
|
-
|
83
|
-
'posts_per_page' => 4,
|
84
|
-
|
85
|
-
)
|
86
|
-
|
87
|
-
);
|
88
|
-
|
89
|
-
?>
|
90
|
-
|
91
|
-
<?php
|
92
|
-
|
93
|
-
if ( $スライド_query->have_posts()
|
94
|
-
|
95
|
-
) : ?>
|
96
|
-
|
97
|
-
<?php while (
|
98
|
-
|
99
|
-
$スライド_query->have_posts() ) : ?>
|
100
|
-
|
101
|
-
<?php $スライド_query->the_post(); ?>
|
102
|
-
|
103
|
-
<div class="home-content">
|
104
|
-
|
105
|
-
<?php the_content(); ?>
|
106
|
-
|
107
|
-
<?php endwhile; ?>
|
108
|
-
|
109
|
-
<?php endif; ?>
|
110
|
-
|
111
|
-
<?php wp_reset_postdata(); ?>
|
112
|
-
|
113
|
-
</div>
|
114
|
-
|
115
|
-
</div>
|
116
|
-
|
117
|
-
<div id="NEWS">
|
118
|
-
|
119
|
-
<div class="NEWS-title">
|
120
|
-
|
121
|
-
<h1>news</h1>
|
122
|
-
|
123
|
-
</div>
|
124
|
-
|
125
|
-
<div class="NEWS-list">
|
126
|
-
|
127
|
-
<p>全て</p>
|
128
|
-
|
129
|
-
</div>
|
130
|
-
|
131
|
-
<div class="NEWS-item1">
|
132
|
-
|
133
|
-
<div class="left-post-list">
|
134
|
-
|
135
|
-
<?php
|
136
|
-
|
137
|
-
if(have_posts()): while(have_posts()):the_post(); ?>
|
138
|
-
|
139
|
-
<div class="left-post-date">
|
140
|
-
|
141
|
-
<?php echo get_the_date(); ?>
|
142
|
-
|
143
|
-
</div>
|
144
|
-
|
145
|
-
<div class="left-post-item">
|
146
|
-
|
147
|
-
<p>ブログ</p>
|
148
|
-
|
149
|
-
</div>
|
150
|
-
|
151
|
-
<a href="<?php the_permalink(); ?>" class="left-post-title">
|
152
|
-
|
153
|
-
<?php the_title(); ?></a>
|
154
|
-
|
155
|
-
<?php endwhile; ?>
|
156
|
-
|
157
|
-
<?php endif; ?>
|
158
|
-
|
159
|
-
<?php wp_reset_postdata(); ?>
|
160
|
-
|
161
|
-
</div>
|
162
|
-
|
163
|
-
<div class="left-news-list">
|
164
|
-
|
165
|
-
<?php
|
166
|
-
|
167
|
-
$posts = new WP_Query(
|
168
|
-
|
169
|
-
array(
|
170
|
-
|
171
|
-
'post_type' => 'news',
|
172
|
-
|
173
|
-
'posts_per_page' => 1
|
174
|
-
|
175
|
-
)
|
176
|
-
|
177
|
-
);
|
178
|
-
|
179
|
-
if ( have_posts() ) : while ( $posts->have_posts() ) : $posts->the_post();
|
180
|
-
|
181
|
-
?>
|
182
|
-
|
183
|
-
<div class="left-news-date">
|
184
|
-
|
185
|
-
<?php echo get_the_date(); ?>
|
186
|
-
|
187
|
-
</div>
|
188
|
-
|
189
|
-
<div class="left-news-item">
|
190
|
-
|
191
|
-
<p>お知らせ</p>
|
192
|
-
|
193
|
-
</div>
|
194
|
-
|
195
|
-
<a href="<?php the_permalink(); ?>" class="left-news-title">
|
196
|
-
|
197
|
-
<?php the_title(); ?></a>
|
198
|
-
|
199
|
-
<?php endwhile; ?>
|
200
|
-
|
201
|
-
<?php endif; ?>
|
202
|
-
|
203
|
-
<?php wp_reset_postdata(); ?>
|
204
|
-
|
205
|
-
</div>
|
206
|
-
|
207
|
-
<div class="center-news-list">
|
208
|
-
|
209
|
-
<div class="NEWS-list2">
|
210
|
-
|
211
|
-
<p>お知らせ</p>
|
212
|
-
|
213
|
-
</div>
|
214
|
-
|
215
|
-
<?php
|
216
|
-
|
217
|
-
$news_query = new WP_Query(
|
218
|
-
|
219
|
-
array(
|
220
|
-
|
221
|
-
'post_type' => 'news',
|
222
|
-
|
223
|
-
'posts_per_page' => 3
|
224
|
-
|
225
|
-
)
|
226
|
-
|
227
|
-
);
|
228
|
-
|
229
|
-
?>
|
230
|
-
|
231
|
-
<div class="center-news-logo">
|
232
|
-
|
233
|
-
<?php
|
234
|
-
|
235
|
-
if ( $news_query->have_posts() ) : ?>
|
236
|
-
|
237
|
-
<?php while ( $news_query->have_posts() ) : ?>
|
238
|
-
|
239
|
-
<?php $news_query->the_post(); ?>
|
240
|
-
|
241
|
-
<div class="center-news-date">
|
242
|
-
|
243
|
-
<?php echo get_the_date(); ?>
|
244
|
-
|
245
|
-
</div>
|
246
|
-
|
247
|
-
<div class="center-news-item">
|
248
|
-
|
249
|
-
<p>お知らせ</p>
|
250
|
-
|
251
|
-
</div>
|
252
|
-
|
253
|
-
<a href="<?php the_permalink(); ?>" class="center-news-title">
|
254
|
-
|
255
|
-
<?php the_title(); ?></a>
|
256
|
-
|
257
|
-
<?php endwhile; ?>
|
258
|
-
|
259
|
-
<?php endif; ?>
|
260
|
-
|
261
|
-
<?php wp_reset_postdata(); ?>
|
262
|
-
|
263
|
-
</div>
|
264
|
-
|
265
|
-
</div>
|
266
|
-
|
267
|
-
</div>
|
268
|
-
|
269
|
-
</div>
|
270
|
-
|
271
|
-
</div>
|
272
|
-
|
273
|
-
<div class="link">
|
274
|
-
|
275
|
-
<div class="next-link">
|
276
|
-
|
277
|
-
<?php next_posts_link('<img src="'. get_theme_file_uri('/img/競技.png'). '" alt=""'); ?>
|
278
|
-
|
279
|
-
</div>
|
280
|
-
|
281
|
-
<div class="previous-link">
|
282
|
-
|
283
|
-
<?php previous_posts_link('<img src="'. get_theme_file_uri('/img/競技-2.png'). '" alt=""'); ?>
|
284
|
-
|
285
|
-
</div>
|
286
|
-
|
287
|
-
</div>
|
288
|
-
|
289
|
-
</main>
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
これがjsのソースコードです。
|
298
|
-
|
299
|
-
jQuery(function(){
|
300
|
-
|
301
|
-
jQuery('.NEWS-list2').on("click",function(){
|
302
|
-
|
303
|
-
jQuery('.center-news-logo').fadeIn(1500);
|
304
|
-
|
305
|
-
jQuery('.left-post-list,.left-news-list').remove();
|
306
|
-
|
307
|
-
jQuery(document).on('click', '.NEWS-list', function(){
|
308
|
-
|
309
|
-
jQuery('.center-news-logo').hide(1500);
|
310
|
-
|
311
|
-
jQuery('.left-post-list,.left-news-list').append();
|
312
|
-
|
313
|
-
});
|
314
|
-
|
315
|
-
});
|
316
|
-
|
317
|
-
});
|
318
|
-
|
319
|
-
|
320
|
-
|
321
327
|
|
322
328
|
|
323
329
|
|
1
wordpressのタグを追加した
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|