質問編集履歴

2

テキスト周瀬尾

2023/02/21 02:00

投稿

Fukusuke0604
Fukusuke0604

スコア554

test CHANGED
File without changes
test CHANGED
@@ -12,12 +12,12 @@
12
12
  しかし、「2023年」の記事以外も表示されてしまいます。
13
13
 
14
14
  ```PHP
15
- <ul class="list-row-link">
15
+ <ul class="">
16
16
  <!---投稿がある年を取得--!>
17
17
  <?php
18
18
  wp_get_archives(array(
19
19
  'type' => 'yearly',
20
- 'before' => '<li class="list-row-link__item">', //デフォルトはnull.<li><a>~</a></li>以外の形で<a>タグをくくりたいときに、設定する
20
+ 'before' => '<li class="">', //デフォルトはnull.<li><a>~</a></li>以外の形で<a>タグをくくりたいときに、設定する
21
21
  'show_post_count' => false, //アーカイブ件数を表示するかしないか. 表示させたい場合はtrueに.
22
22
  'echo' => '1', //関数で取得した値を出力するかしないか.したくないときは、'0'またはfalse指定.
23
23
  'order' => 'DESC',

1

テキスト修正

2023/02/21 01:59

投稿

Fukusuke0604
Fukusuke0604

スコア554

test CHANGED
File without changes
test CHANGED
@@ -30,7 +30,7 @@
30
30
  $year = trim($yearpath,'/');
31
31
  echo '<h2>'.$year.'年</h2>';
32
32
  ?>
33
- <ul class="news-list" data-archive-list="news" data-item=".news-list__item" data-count="10">
33
+ <ul class="">
34
34
  <!--投稿タイプnewsの記事を一覧表示--!>
35
35
  <?php
36
36
  $args = array(
@@ -49,15 +49,14 @@
49
49
  $the_query = new WP_Query($args);
50
50
  if ($the_query->have_posts()) :
51
51
  ?>
52
- <!-- ループ前の開始タグ -->
53
52
  <?php while ($the_query->have_posts()) : $the_query->the_post(); ?>
54
53
  <?php
55
54
  $terms = get_the_terms($post->ID, 'news_cat');
56
55
  ?>
57
56
  <!-- posts_per_page: -1 -->
58
- <li class="news-list__item">
57
+ <li class=">
59
- <div class="news-list-item">
58
+ <div class="">
60
- <div class="news-list-item__category">
59
+ <div class=">
61
60
 
62
61
  <?php
63
62
  foreach ($terms as $term) {
@@ -67,10 +66,10 @@
67
66
  ?>
68
67
 
69
68
  </div>
70
- <div class="news-list-item__date">
69
+ <div class="">
71
- <p class="label-date"><?= get_the_time('Y.m.d', $id); ?></p>
70
+ <p class=""><?= get_the_time('Y.m.d', $id); ?></p>
72
71
  </div>
73
- <div class="news-list-item__title">
72
+ <div class="">
74
73
  <p class="text"><a href=<?php the_permalink(); ?>><?= get_the_title(); ?></a></p>
75
74
  </div>
76
75
  </div>
@@ -81,7 +80,7 @@
81
80
  <?php
82
81
  else :
83
82
  ?>
84
- <div class="c-text-box u-text-align-center-pc">
83
+ <div class="">
85
84
  <p>投稿が存在しません。</p>
86
85
  </div>
87
86
  <?php