2016-10-27 4 views
-2

私はtag.phpを表示するために再帰的なループを作成したいWordPressのテンプレートはクールに見える。Wordpress - 現在のタグページの結果を印刷するには?

たとえば、タグ名「スポーツ」があります。

結果をカテゴリ別に分割して表示したいと考えています。このよう

CAVSニュース

  • 最初の投稿
  • 第2のポスト
  • サードポスト

OKCのニュース

  • 最初の投稿
  • 第2のポスト
  • 第三のポスト私はそれを行うことができますどのよう

ありがとうございました。

+0

私はここでコメントしようとしましたが、長すぎます – Shahar15

答えて

0

MX0:

実際に私が唯一のカテゴリで、それはこのように見えるが印刷する方法を知っている:

 <div class="row main-row main-row-first"> 
     <div class="container"> 

      <!-- Category Section --> 
      <section class="search-section post"> 
       <div class="row"> 

        <!-- Category Title --> 
        <div class="col-md-4"> 
         <div class="post-header"> 
          <h2 class="post-title extra-big">Cavs News</h2> 
         </div> 
        </div> 
        <!-- Category Title --> 


        <div class="col-md-7 col-md-offset-1"> 

         <?php 
         /* Start the Loop */ 
         while (have_posts()) : the_post(); 
         ?> 

         <!-- Category Post --> 
         <article class="search-section-item news-post"> 
          <a href="#"> 
           <header class="news-post-header"> 
            <h1 class="news-post-title red"><?php the_title(); ?></h1> 
            <span class="news-post-meta"><?php the_date('d.m.Y') ?>/<?php the_author() ?></span> 
           </header> 
           <div class="news-post-content"> 
            <p> 
             <?php echo mb_strimwidth(get_field('intro'), 0, 100, '...') ?> <i class="readmore-icon"></i> 
            </p> 
           </div> 
          </a> 
         </article> 

         <?php endwhile; ?> 


        </div> 

       </div> 
      </section> 
      <!-- Category Section --> 


     </div><!-- end .container --> 
    </div> 

私は私のコードは、最初のタイトルに開始すべきである知っているが、私は知りませんhow

関連する問題