質問編集履歴

1

追記でarchive\.phpとcontent\.phpを記載いたしました。

2016/04/28 03:40

投稿

cotton88
cotton88

スコア87

test CHANGED
File without changes
test CHANGED
@@ -214,4 +214,200 @@
214
214
 
215
215
 
216
216
 
217
+ 追記-------------------------------------------
218
+
219
+ ※テーマは、underscoreをカスタマイズして利用しています。
220
+
221
+
222
+
223
+ ```html
224
+
225
+ //archive.php
226
+
227
+ <?php
228
+
229
+ get_header(); ?>
230
+
231
+
232
+
233
+ <div id="primary" class="content-area col-md-8">
234
+
235
+ <main id="main" class="site-main" role="main">
236
+
237
+
238
+
239
+ <?php
240
+
241
+ if ( have_posts() ) : ?>
242
+
243
+
244
+
245
+ <header class="page-header">
246
+
247
+ <?php
248
+
249
+ the_archive_title( '<h1 class="page-title">', '</h1>' );
250
+
251
+ the_archive_description( '<div class="taxonomy-description">', '</div>' );
252
+
253
+ ?>
254
+
255
+ </header><!-- .page-header -->
256
+
257
+
258
+
259
+ <?php
260
+
261
+ /* Start the Loop */
262
+
263
+ while ( have_posts() ) : the_post();
264
+
265
+
266
+
267
+ /*
268
+
269
+ * Include the Post-Format-specific template for the content.
270
+
271
+ * If you want to override this in a child theme, then include a file
272
+
273
+ * called content-___.php (where ___ is the Post Format name) and that will be used instead.
274
+
275
+ */
276
+
277
+ get_template_part( 'template-parts/content', get_post_format() );
278
+
279
+
280
+
281
+ endwhile;
282
+
283
+
284
+
285
+ the_posts_navigation();
286
+
287
+
288
+
289
+ else :
290
+
291
+
292
+
293
+ get_template_part( 'template-parts/content', 'none' );
294
+
295
+
296
+
297
+ endif; ?>
298
+
299
+
300
+
301
+ </main><!-- #main -->
302
+
303
+ </div><!-- #primary -->
304
+
305
+
306
+
307
+ <?php
308
+
309
+ get_sidebar();
310
+
311
+ get_footer();
312
+
313
+ ```
314
+
315
+
316
+
317
+ ```html
318
+
319
+ //content.php
320
+
321
+ <?php
322
+
323
+
324
+
325
+ ?>
326
+
327
+
328
+
329
+ <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
330
+
331
+ <header class="entry-header">
332
+
333
+ <?php
334
+
335
+ if ( is_single() ) {
336
+
337
+ the_title( '<h1 class="entry-title">', '</h1>' );
338
+
339
+ } else {
340
+
341
+ the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
342
+
343
+ }
344
+
345
+
346
+
347
+ //これが出ない。
348
+
349
+ wp_list_categories('title_li=&taxonomy=websites');
350
+
351
+
352
+
353
+ if ( 'post' === get_post_type() ) : ?>
354
+
355
+ <div class="entry-meta">
356
+
357
+ <?php hogehoge_posted_on(); ?>
358
+
359
+ </div><!-- .entry-meta -->
360
+
361
+ <?php
362
+
363
+ endif; ?>
364
+
365
+ </header><!-- .entry-header -->
366
+
367
+
368
+
369
+ <div class="entry-content">
370
+
371
+ <?php
372
+
373
+ the_content( sprintf(
374
+
375
+ /* translators: %s: Name of current post. */
376
+
377
+ wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'hogehoge' ), array( 'span' => array( 'class' => array() ) ) ),
378
+
379
+ the_title( '<span class="screen-reader-text">"', '"</span>', false )
380
+
381
+ ) );
382
+
383
+
384
+
385
+ wp_link_pages( array(
386
+
387
+ 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'hogehoge' ),
388
+
389
+ 'after' => '</div>',
390
+
391
+ ) );
392
+
393
+ ?>
394
+
395
+ </div><!-- .entry-content -->
396
+
397
+
398
+
399
+ <footer class="entry-footer">
400
+
401
+ <?php hogehoge_entry_footer(); ?>
402
+
403
+ </footer><!-- .entry-footer -->
404
+
405
+ </article><!-- #post-## -->
406
+
407
+
408
+
409
+ ```
410
+
411
+
412
+
217
413
  よろしくお願いいたします。