質問編集履歴

1

コード追加

2022/01/09 05:15

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -126,253 +126,253 @@
126
126
 
127
127
  <div class="pagenation">
128
128
 
129
+
130
+
131
+ if ($the_query->max_num_pages > 1) {
132
+
133
+ echo paginate_links(array(
134
+
135
+ 'base' => get_pagenum_link(1) . '%_%',
136
+
137
+ 'format' => 'page/%#%/',
138
+
139
+ 'current' => max(1, $paged),
140
+
141
+ 'mid_size' => 1,
142
+
143
+ 'total' => $the_query->max_num_pages
144
+
145
+ ));
146
+
147
+ }
148
+
149
+ wp_reset_postdata();?>
150
+
151
+ </div><!-- /pagenation -->
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+ </div>
160
+
161
+
162
+
163
+ </div>
164
+
165
+
166
+
167
+
168
+
169
+ </div>
170
+
171
+
172
+
129
- <?php ```ここに言語を入力
173
+ <?php get_footer(); ?>
130
-
131
- コード
174
+
175
+
132
176
 
133
177
  ```
134
178
 
135
- if ($the_query->max_num_pages > 1) {
136
-
137
- echo paginate_links(array(
138
-
139
- 'base' => get_pagenum_link(1) . '%_%',
140
-
141
- 'format' => 'page/%#%/',
142
-
143
- 'current' => max(1, $paged),
144
-
145
- 'mid_size' => 1,
146
-
147
- 'total' => $the_query->max_num_pages
148
-
149
- ));
150
-
151
- }
152
-
153
- wp_reset_postdata();?>
154
-
155
- </div><!-- /pagenation -->
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
- </div>
164
-
165
-
166
-
167
- </div>
168
-
169
-
170
-
171
-
172
-
173
- </div>
179
+
180
+
181
+ .single-articleList.php(記事ページ)
182
+
183
+ ```
184
+
185
+ <?php get_header(); ?>
186
+
187
+ <div id="content" class="w_inner single_article_container">
188
+
189
+
190
+
191
+ <?php if(have_posts()) : while(have_posts()) : the_post(); ?><!-- ループ開始 -->
192
+
193
+
194
+
195
+
196
+
197
+ <img src="<?php bloginfo('template_url') ?>" srcset="<?php bloginfo('template_url'); ?>" alt="">
198
+
199
+ <div class="artic_titile"><h2><?php echo CFS()->get("title"); ?></h2></div>
200
+
201
+ <div class="hai"> </div>
202
+
203
+ <div class="artic_img"><img src="<?php echo CFS()->get("thumbnail"); ?>" alt="代表の画像"></div>
204
+
205
+
206
+
207
+
208
+
209
+ <div class="artic__box">
210
+
211
+ <div class="artic_representative"><p><?php echo CFS()->get("representative"); ?></p></div>
212
+
213
+ <div class="artic_in">
214
+
215
+ <div class="artic_company"><?php echo CFS()->get("company"); ?></div>
216
+
217
+ <div div class="artic_president"><?php echo CFS()->get("president"); ?></div>
218
+
219
+ <div div class="artic_logo"><img src="<?php echo CFS()->get("logoma"); ?>" alt=""></div>
220
+
221
+ </div>
222
+
223
+ </div>
224
+
225
+
226
+
227
+ <div class="video_box">
228
+
229
+ <div class="artic_video">
230
+
231
+ <div class="video_link"><h2><?php echo CFS()->get("video_link"); ?></h2></div>
232
+
233
+ <a href="" class="btn">
234
+
235
+ <div class="artic_president_link"><?php echo CFS()->get("link"); ?></div>
236
+
237
+ </a>
238
+
239
+ </div>
240
+
241
+ </div>
242
+
243
+
244
+
245
+ <div class="interview_box">
246
+
247
+ <div class="interview_item">
248
+
249
+ <div class="artic_sub"><h3><?php echo CFS()->get("sub"); ?></h3></div>
250
+
251
+ <div class="artic_interview_co"><p><?php echo CFS()->get("interview_co"); ?></p></div>
252
+
253
+ </div>
254
+
255
+ </div>
256
+
257
+
258
+
259
+
260
+
261
+ <div class="pro_box">
262
+
263
+ <div class="pro_item">
264
+
265
+ <div class="artic_pro"><h3><?php echo CFS()->get("pro"); ?></h3></div>
266
+
267
+ <div class="pro_co"><p><?php echo CFS()->get("pro_co"); ?></p></div>
268
+
269
+ </div>
270
+
271
+ </div>
272
+
273
+
274
+
275
+
276
+
277
+ <div class="profile_box">
278
+
279
+ <div class="profile_item">
280
+
281
+ <div class="profile"><h3><?php echo CFS()->get("profile"); ?></h3></div>
282
+
283
+ <div class="profile_co"><p><?php echo CFS()->get("profile_co"); ?></p></div>
284
+
285
+ </div>
286
+
287
+ </div>
288
+
289
+
290
+
291
+ </div>
292
+
293
+
294
+
295
+
296
+
297
+ <div class="button13">
298
+
299
+ <a href="<?php bloginfo("url");?>/Article">◀︎ 記事一覧に戻る</a>
300
+
301
+ </div>
302
+
303
+
304
+
305
+ <div class="a_list_sub">
306
+
307
+ <?php
308
+
309
+ $args = array(
310
+
311
+ 'post_type' => 'articleList',
312
+
313
+ 'posts_per_page' => 3,
314
+
315
+ 'paged' => $paged
316
+
317
+ );
318
+
319
+ $the_query = new WP_Query($args);
320
+
321
+ ?>
322
+
323
+ <ul class="artic_list">
324
+
325
+ <?php if($the_query->have_posts()):while($the_query->have_posts()):$the_query->the_post();?>
326
+
327
+ <li class="artic_list_item">
328
+
329
+ <a href="<?php the_permalink();?>">
330
+
331
+
332
+
333
+ <div class="artic_img_sub"><img src="<?php echo CFS()->get("thumbnail"); ?>" alt="代表の画像"></div>
334
+
335
+ <div class="artic_titile_sub"><h3><?php echo CFS()->get("title"); ?></h3></div>
336
+
337
+ <div class="artic_company_sub"><?php echo CFS()->get("company"); ?></div>
338
+
339
+ <div class="artic_president_sub"><?php echo CFS()->get("president"); ?></div>
340
+
341
+
342
+
343
+ </a>
344
+
345
+ </li>
346
+
347
+ <?php endwhile; ?>
348
+
349
+ </ul>
350
+
351
+ <?php wp_reset_postdata(); ?>
352
+
353
+ <?php else : ?>
354
+
355
+ <?php endif;?>
356
+
357
+
358
+
359
+
360
+
361
+ <?php the_content(); ?>
362
+
363
+ <?php endwhile; endif; ?><!--/ループの終わり -->
364
+
365
+ </div>
174
366
 
175
367
 
176
368
 
177
369
  <?php get_footer(); ?>
178
370
 
179
-
180
-
181
371
  ```
182
372
 
183
-
184
-
185
- .single-articleList.php(記事ページ)
186
-
187
- ```
188
-
189
- <?php get_header(); ?>
190
-
191
- <div id="content" class="w_inner single_article_container">
192
-
193
-
194
-
195
- <?php if(have_posts()) : while(have_posts()) : the_post(); ?><!-- ループ開始 -->
196
-
197
-
198
-
199
-
200
-
201
- <img src="<?php bloginfo('template_url') ?>" srcset="<?php bloginfo('template_url'); ?>" alt="">
202
-
203
- <div class="artic_titile"><h2><?php echo CFS()->get("title"); ?></h2></div>
204
-
205
- <div class="hai"> </div>
206
-
207
- <div class="artic_img"><img src="<?php echo CFS()->get("thumbnail"); ?>" alt="代表の画像"></div>
208
-
209
-
210
-
211
-
212
-
213
- <div class="artic__box">
214
-
215
- <div class="artic_representative"><p><?php echo CFS()->get("representative"); ?></p></div>
216
-
217
- <div class="artic_in">
218
-
219
- <div class="artic_company"><?php echo CFS()->get("company"); ?></div>
220
-
221
- <div div class="artic_president"><?php echo CFS()->get("president"); ?></div>
222
-
223
- <div div class="artic_logo"><img src="<?php echo CFS()->get("logoma"); ?>" alt=""></div>
224
-
225
- </div>
226
-
227
- </div>
228
-
229
-
230
-
231
- <div class="video_box">
232
-
233
- <div class="artic_video">
234
-
235
- <div class="video_link"><h2><?php echo CFS()->get("video_link"); ?></h2></div>
236
-
237
- <a href="" class="btn">
238
-
239
- <div class="artic_president_link"><?php echo CFS()->get("link"); ?></div>
240
-
241
- </a>
242
-
243
- </div>
244
-
245
- </div>
246
-
247
373
 
248
374
 
249
- <div class="interview_box">
375
+
250
-
251
- <div class="interview_item">
252
-
253
- <div class="artic_sub"><h3><?php echo CFS()->get("sub"); ?></h3></div>
254
-
255
- <div class="artic_interview_co"><p><?php echo CFS()->get("interview_co"); ?></p></div>
256
-
257
- </div>
258
-
259
- </div>
260
-
261
-
262
-
263
-
264
-
265
- <div class="pro_box">
266
-
267
- <div class="pro_item">
268
-
269
- <div class="artic_pro"><h3><?php echo CFS()->get("pro"); ?></h3></div>
270
-
271
- <div class="pro_co"><p><?php echo CFS()->get("pro_co"); ?></p></div>
272
-
273
- </div>
274
-
275
- </div>
276
-
277
-
278
-
279
-
280
-
281
- <div class="profile_box">
282
-
283
- <div class="profile_item">
284
-
285
- <div class="profile"><h3><?php echo CFS()->get("profile"); ?></h3></div>
286
-
287
- <div class="profile_co"><p><?php echo CFS()->get("profile_co"); ?></p></div>
288
-
289
- </div>
290
-
291
- </div>
292
-
293
-
294
-
295
- </div>
296
-
297
-
298
-
299
-
300
-
301
- <div class="button13">
302
-
303
- <a href="<?php bloginfo("url");?>/Article">◀︎ 記事一覧に戻る</a>
304
-
305
- </div>
306
-
307
-
308
-
309
- <div class="a_list_sub">
310
-
311
- <?php
312
-
313
- $args = array(
314
-
315
- 'post_type' => 'articleList',
316
-
317
- 'posts_per_page' => 3,
318
-
319
- 'paged' => $paged
320
-
321
- );
322
-
323
- $the_query = new WP_Query($args);
324
-
325
- ?>
326
-
327
- <ul class="artic_list">
328
-
329
- <?php if($the_query->have_posts()):while($the_query->have_posts()):$the_query->the_post();?>
330
-
331
- <li class="artic_list_item">
332
-
333
- <a href="<?php the_permalink();?>">
334
-
335
-
336
-
337
- <div class="artic_img_sub"><img src="<?php echo CFS()->get("thumbnail"); ?>" alt="代表の画像"></div>
338
-
339
- <div class="artic_titile_sub"><h3><?php echo CFS()->get("title"); ?></h3></div>
340
-
341
- <div class="artic_company_sub"><?php echo CFS()->get("company"); ?></div>
342
-
343
- <div class="artic_president_sub"><?php echo CFS()->get("president"); ?></div>
344
-
345
-
346
-
347
- </a>
348
-
349
- </li>
350
-
351
- <?php endwhile; ?>
352
-
353
- </ul>
354
-
355
- <?php wp_reset_postdata(); ?>
356
-
357
- <?php else : ?>
358
-
359
- <?php endif;?>
360
-
361
-
362
-
363
-
364
-
365
- <?php the_content(); ?>
366
-
367
- <?php endwhile; endif; ?><!--/ループの終わり -->
368
-
369
- </div>
370
-
371
-
372
-
373
- <?php get_footer(); ?>
374
-
375
- ```
376
376
 
377
377
 
378
378