カスタム投稿タイプの検索結果で(search.php)、
各記事で使用しているタームを表示させたいのですが、上手く行きません。
アドバイスよろしくお願い致します。
PHP
1 <ul class="accordion"> 2 <li class="list-header"><span class="term">タグ</span><h2>質問</h2></li><!--表のヘッダー部分--> 3 4 <?php if (have_posts()) : ?> 5 <?php while (have_posts()) : the_post(); ?> 6 7 <li class="accordion-item"> 8 <div class="accordion-header"> 9 <span class="term"><?php the_tags(); ?></span><!--ターム--> 10 <?php the_title(); ?><i class="accordion-corsor"></i></div><!--記事タイトル--> 11 <div class="accordion-body"> 12 投稿日:<time datetime="<?php the_time('c'); ?>" pubdate="pubdate"><?php the_time('Y年n月d日H:i(D)') ?></time> 13 <span class="edit"><?php edit_post_link(); ?></span><br /><br /> 14 <?php the_content(); ?> 15 </div> 16 </li> 17 <?php endwhile; ?> 18 19 <?php else: ?> 20 記事はありません。 21 <?php endif; ?> 22 23 </ul>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。