質問編集履歴
4
使用ツールを追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -62,9 +62,13 @@
|
|
62
62
|
|
63
63
|
### 補足情報(FW/ツールのバージョンなど)
|
64
64
|
|
65
|
-
|
65
|
+
ez-HTML 7.71
|
66
|
-
|
66
|
+
|
67
|
-
|
67
|
+
Dream weaver CS5
|
68
|
+
|
69
|
+
上記2つは使える環境です!
|
70
|
+
|
71
|
+
|
68
72
|
|
69
73
|
### 前提・実現したいこと
|
70
74
|
|
3
初心者アイコンをオンにしました!あとエラーが出ているとかって表記が残ったままになっていたので削除してます。
test
CHANGED
File without changes
|
test
CHANGED
@@ -112,7 +112,7 @@
|
|
112
112
|
|
113
113
|
|
114
114
|
|
115
|
-
### 該当のソースコード
|
115
|
+
### 該当のソースコード
|
116
116
|
|
117
117
|
|
118
118
|
|
2
コードを最新盤に差し替えました!
test
CHANGED
File without changes
|
test
CHANGED
@@ -104,9 +104,7 @@
|
|
104
104
|
|
105
105
|
```
|
106
106
|
|
107
|
-
|
107
|
+
▼サイトの現状
|
108
|
-
|
109
|
-
↓
|
110
108
|
|
111
109
|
http://ictaga.com/members/okui/wp2/
|
112
110
|
|
@@ -182,133 +180,141 @@
|
|
182
180
|
|
183
181
|
|
184
182
|
|
185
|
-
<!-- アイキャッチ画像一覧の表示
|
183
|
+
<!-- アイキャッチ画像一覧の表示 ここから -->
|
186
184
|
|
187
185
|
<div class="article-wrap">
|
188
186
|
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
187
|
+
<?php
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
$archive_title = '';
|
192
|
+
|
193
|
+
$archive_subtitle = '';
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
if ( is_search() ) {
|
198
|
+
|
199
|
+
global $wp_query;
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
$archive_title = sprintf(
|
204
|
+
|
205
|
+
'%1$s %2$s',
|
206
|
+
|
207
|
+
'<span class="color-accent">' . __( 'Search:', 'twentytwenty' ) . '</span>',
|
208
|
+
|
209
|
+
'“' . get_search_query() . '”'
|
210
|
+
|
211
|
+
);
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
if ( $wp_query->found_posts ) {
|
216
|
+
|
217
|
+
$archive_subtitle = sprintf(
|
218
|
+
|
219
|
+
/* translators: %s: Number of search results. */
|
220
|
+
|
221
|
+
_n(
|
222
|
+
|
223
|
+
'We found %s result for your search.',
|
224
|
+
|
225
|
+
'We found %s results for your search.',
|
226
|
+
|
227
|
+
$wp_query->found_posts,
|
228
|
+
|
229
|
+
'twentytwenty'
|
230
|
+
|
231
|
+
),
|
232
|
+
|
233
|
+
number_format_i18n( $wp_query->found_posts )
|
234
|
+
|
235
|
+
);
|
236
|
+
|
237
|
+
} else {
|
238
|
+
|
239
|
+
$archive_subtitle = __( 'We could not find any results for your search. You can give it another try through the search form below.', 'twentytwenty' );
|
240
|
+
|
241
|
+
}
|
242
|
+
|
243
|
+
} elseif ( is_archive() && ! have_posts() ) {
|
244
|
+
|
245
|
+
$archive_title = __( 'Nothing Found', 'twentytwenty' );
|
246
|
+
|
247
|
+
} elseif ( ! is_home() ) {
|
248
|
+
|
249
|
+
$archive_title = get_the_archive_title();
|
250
|
+
|
251
|
+
$archive_subtitle = get_the_archive_description();
|
252
|
+
|
253
|
+
}
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
if ( $archive_title || $archive_subtitle ) {
|
258
|
+
|
259
|
+
?>
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
<header class="archive-header has-text-align-center header-footer-group">
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
<div class="archive-header-inner section-inner medium">
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
<?php if ( $archive_title ) { ?>
|
272
|
+
|
273
|
+
<h3 class="archive-title"><?php echo wp_kses_post( $archive_title ); ?></h3>
|
274
|
+
|
275
|
+
<?php } ?>
|
276
|
+
|
277
|
+
<?php
|
278
|
+
|
279
|
+
$thumbnail_id = get_post_thumbnail_id();//アイキャッチのID
|
280
|
+
|
281
|
+
$data = wp_get_attachment_image_src($thumbnail_id,'thumbnail');//配列
|
282
|
+
|
283
|
+
?>
|
284
|
+
|
285
|
+
<img src="<?php echo $data[0] ;?>" width="<?php echo $data[1] ;?>" height="<?php echo $data[2] ;?>" >
|
286
|
+
|
287
|
+
<?php if ( $archive_subtitle ) { ?>
|
288
|
+
|
289
|
+
<div class="archive-subtitle section-inner thin max-percentage intro-text"><?php echo wp_kses_post( wpautop( $archive_subtitle ) ); ?></div>
|
290
|
+
|
291
|
+
<?php } ?>
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
</div><!-- .archive-header-inner -->
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
</header><!-- .archive-header -->
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
<?php
|
304
|
+
|
305
|
+
}
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
if ( have_posts() ) {
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
$i = 0;
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
while ( have_posts() ) {
|
312
318
|
|
313
319
|
$i++;
|
314
320
|
|
@@ -328,49 +334,47 @@
|
|
328
334
|
|
329
335
|
|
330
336
|
|
331
|
-
|
337
|
+
}
|
338
|
+
|
332
|
-
|
339
|
+
} elseif ( is_search() ) {
|
340
|
+
|
341
|
+
?>
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
<div class="no-search-results-form section-inner thin">
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
<?php
|
350
|
+
|
351
|
+
get_search_form(
|
352
|
+
|
353
|
+
array(
|
354
|
+
|
355
|
+
'label' => __( 'search again', 'twentytwenty' ),
|
356
|
+
|
357
|
+
)
|
358
|
+
|
359
|
+
);
|
360
|
+
|
361
|
+
?>
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
</div><!-- .no-search-results -->
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
<?php
|
370
|
+
|
333
|
-
|
371
|
+
}
|
334
|
-
|
335
|
-
|
372
|
+
|
336
|
-
|
337
|
-
|
373
|
+
?>
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
374
|
+
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
375
|
+
|
346
|
-
|
347
|
-
|
376
|
+
|
348
|
-
|
349
|
-
array(
|
350
|
-
|
351
|
-
'label' => __( 'search again', 'twentytwenty' ),
|
352
|
-
|
353
|
-
)
|
354
|
-
|
355
|
-
);
|
356
|
-
|
357
|
-
?>
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
</div><!-- .no-search-results -->
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
<?php
|
366
|
-
|
367
|
-
}
|
368
|
-
|
369
|
-
?>
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
377
|
+
<?php get_template_part( 'template-parts/pagination' ); ?>
|
374
378
|
|
375
379
|
|
376
380
|
|
1
コードの最新状態への差し替え
test
CHANGED
File without changes
|
test
CHANGED
@@ -104,7 +104,11 @@
|
|
104
104
|
|
105
105
|
```
|
106
106
|
|
107
|
-
エラー
|
107
|
+
96行目にエラー表示されるようになってます!
|
108
|
+
|
109
|
+
↓
|
110
|
+
|
111
|
+
http://ictaga.com/members/okui/wp2/
|
108
112
|
|
109
113
|
```
|
110
114
|
|
@@ -114,45 +118,117 @@
|
|
114
118
|
|
115
119
|
|
116
120
|
|
121
|
+
```php
|
122
|
+
|
117
123
|
<?php
|
118
124
|
|
125
|
+
/**
|
126
|
+
|
127
|
+
* The main template file
|
128
|
+
|
129
|
+
*
|
130
|
+
|
131
|
+
* This is the most generic template file in a WordPress theme
|
132
|
+
|
133
|
+
* and one of the two required files for a theme (the other being style.css).
|
134
|
+
|
135
|
+
* It is used to display a page when nothing more specific matches a query.
|
136
|
+
|
137
|
+
* E.g., it puts together the home page when no home.php file exists.
|
138
|
+
|
139
|
+
*
|
140
|
+
|
141
|
+
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
142
|
+
|
143
|
+
*
|
144
|
+
|
145
|
+
* @package WordPress
|
146
|
+
|
147
|
+
* @subpackage Twenty_Twenty
|
148
|
+
|
149
|
+
* @since Twenty Twenty 1.0
|
150
|
+
|
151
|
+
*/
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
get_header();
|
156
|
+
|
157
|
+
?>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
<main id="site-content" role="main">
|
162
|
+
|
163
|
+
<!-- カテゴリ一覧の表示 ここから -->
|
164
|
+
|
165
|
+
<ul class="category_list">
|
166
|
+
|
167
|
+
<?php
|
168
|
+
|
169
|
+
$cat_all = get_terms( "category", "fields=all&get=all&exclude_tree=12&exclude=11" );
|
170
|
+
|
171
|
+
foreach($cat_all as $value):
|
172
|
+
|
173
|
+
?>
|
174
|
+
|
175
|
+
<li><a href="<?php echo get_category_link($value->term_id); ?>"><?php echo $value->name;?>(<?php echo $value->count;?>)</a></li>
|
176
|
+
|
177
|
+
<?php endforeach; ?>
|
178
|
+
|
179
|
+
</ul>
|
180
|
+
|
181
|
+
<!-- カテゴリ一覧の表示 ここまで -->
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
<!-- アイキャッチ画像一覧の表示 ここから -->
|
186
|
+
|
187
|
+
<div class="article-wrap">
|
188
|
+
|
189
|
+
<?php
|
190
|
+
|
191
|
+
|
192
|
+
|
119
|
-
$archive_title = '';
|
193
|
+
$archive_title = '';
|
120
|
-
|
194
|
+
|
121
|
-
$archive_subtitle = '';
|
195
|
+
$archive_subtitle = '';
|
122
|
-
|
123
|
-
|
124
|
-
|
196
|
+
|
197
|
+
|
198
|
+
|
125
|
-
if ( is_search() ) {
|
199
|
+
if ( is_search() ) {
|
126
|
-
|
200
|
+
|
127
|
-
global $wp_query;
|
201
|
+
global $wp_query;
|
202
|
+
|
203
|
+
|
128
204
|
|
129
205
|
$archive_title = sprintf(
|
130
206
|
|
131
|
-
'%1$s %2$s',
|
207
|
+
'%1$s %2$s',
|
132
|
-
|
208
|
+
|
133
|
-
'<span class="color-accent">' . __( 'Search:', 'twentytwenty' ) . '</span>',
|
209
|
+
'<span class="color-accent">' . __( 'Search:', 'twentytwenty' ) . '</span>',
|
134
|
-
|
210
|
+
|
135
|
-
'“' . get_search_query() . '”'
|
211
|
+
'“' . get_search_query() . '”'
|
136
|
-
|
212
|
+
|
137
|
-
);
|
213
|
+
);
|
138
|
-
|
139
|
-
|
140
|
-
|
214
|
+
|
215
|
+
|
216
|
+
|
141
|
-
if ( $wp_query->found_posts ) {
|
217
|
+
if ( $wp_query->found_posts ) {
|
142
|
-
|
218
|
+
|
143
|
-
$archive_subtitle = sprintf(
|
219
|
+
$archive_subtitle = sprintf(
|
144
|
-
|
220
|
+
|
145
|
-
/* translators: %s: Number of search results. */
|
221
|
+
/* translators: %s: Number of search results. */
|
146
|
-
|
222
|
+
|
147
|
-
_n(
|
223
|
+
_n(
|
148
|
-
|
224
|
+
|
149
|
-
'We found %s result for your search.',
|
225
|
+
'We found %s result for your search.',
|
150
|
-
|
226
|
+
|
151
|
-
'We found %s results for your search.',
|
227
|
+
'We found %s results for your search.',
|
152
|
-
|
228
|
+
|
153
|
-
$wp_query->found_posts,
|
229
|
+
$wp_query->found_posts,
|
154
|
-
|
230
|
+
|
155
|
-
'twentytwenty'
|
231
|
+
'twentytwenty'
|
156
232
|
|
157
233
|
),
|
158
234
|
|
@@ -200,6 +276,16 @@
|
|
200
276
|
|
201
277
|
<?php } ?>
|
202
278
|
|
279
|
+
<?php
|
280
|
+
|
281
|
+
$thumbnail_id = get_post_thumbnail_id();//アイキャッチのID
|
282
|
+
|
283
|
+
$data = wp_get_attachment_image_src($thumbnail_id,'thumbnail');//配列
|
284
|
+
|
285
|
+
?>
|
286
|
+
|
287
|
+
<img src="<?php echo $data[0] ;?>" width="<?php echo $data[1] ;?>" height="<?php echo $data[2] ;?>" >
|
288
|
+
|
203
289
|
<?php if ( $archive_subtitle ) { ?>
|
204
290
|
|
205
291
|
<div class="archive-subtitle section-inner thin max-percentage intro-text"><?php echo wp_kses_post( wpautop( $archive_subtitle ) ); ?></div>
|
@@ -222,33 +308,29 @@
|
|
222
308
|
|
223
309
|
|
224
310
|
|
225
|
-
if ( have_posts() ) {
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
$i = 0;
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
311
|
+
while ( have_posts() ) {
|
234
|
-
|
312
|
+
|
235
|
-
|
313
|
+
$i++;
|
236
|
-
|
314
|
+
|
237
|
-
|
315
|
+
if ( $i > 1 ) {
|
238
|
-
|
316
|
+
|
239
|
-
|
317
|
+
echo '<hr class="post-separator styled-separator is-style-wide section-inner" aria-hidden="true" />';
|
240
|
-
|
318
|
+
|
241
|
-
|
319
|
+
}
|
242
|
-
|
320
|
+
|
321
|
+
|
322
|
+
|
243
|
-
|
323
|
+
the_post();
|
244
|
-
|
245
|
-
|
246
|
-
|
324
|
+
|
325
|
+
|
326
|
+
|
247
|
-
|
327
|
+
get_template_part( 'template-parts/content', get_post_type() );
|
248
|
-
|
249
|
-
|
250
|
-
|
328
|
+
|
329
|
+
|
330
|
+
|
251
|
-
|
331
|
+
}
|
332
|
+
|
333
|
+
}
|
252
334
|
|
253
335
|
} elseif ( is_search() ) {
|
254
336
|
|
@@ -294,6 +376,8 @@
|
|
294
376
|
|
295
377
|
</main><!-- #site-content -->
|
296
378
|
|
379
|
+
</div><!-- /.article-wrap -->
|
380
|
+
|
297
381
|
|
298
382
|
|
299
383
|
<?php get_template_part( 'template-parts/footer-menus-widgets' ); ?>
|
@@ -304,7 +388,7 @@
|
|
304
388
|
|
305
389
|
get_footer();
|
306
390
|
|
307
|
-
|
391
|
+
```
|
308
392
|
|
309
393
|
|
310
394
|
|