Php 如何在wordpress中为帖子指定引导列和引导行

Php 如何在wordpress中为帖子指定引导列和引导行,php,wordpress,twitter-bootstrap,Php,Wordpress,Twitter Bootstrap,我试图使我在wordpress安装上的帖子显示为“col-md-6”全尺寸预览,然后显示“col-md-6”和“row”,以水平拆分不同的帖子 以下是我的代码,以使它们显示为单独的块-但我需要这种类型的设置: 页首 |后1 |后2 |休息 |1号岗位| 3号岗位| 以下是我目前的代码: 您能否更清楚地了解预期的外观以及当前的问题是什么?你想要两列吗?3列?您是否可以更清楚地了解预期的外观以及当前的问题是什么?你想要两列吗?3列? <?php $x = 1; $a

我试图使我在wordpress安装上的帖子显示为“col-md-6”全尺寸预览,然后显示“col-md-6”和“row”,以水平拆分不同的帖子

以下是我的代码,以使它们显示为单独的块-但我需要这种类型的设置: 页首 |后1 |后2 |休息 |1号岗位| 3号岗位|

以下是我目前的代码:



您能否更清楚地了解预期的外观以及当前的问题是什么?你想要两列吗?3列?您是否可以更清楚地了解预期的外观以及当前的问题是什么?你想要两列吗?3列?
     <?php 

  $x = 1;

  $args = array('cat'=> 107, 'order'=>'ASC' );
    query_posts( $args);

    // The Loop
    while ( have_posts() ) : the_post();
    $post_id = get_the_ID(); ?>

    <a href="<?php the_permalink(); ?>">
     <div class="row">
      <div class="col-md-12 center">
       <div class="lightgrey_bg">
           <div class="explore_icon 
     <?php if ($x == 1) {echo 'red_bg';} 
     elseif ($x == 2) {echo 'green_bg';} 
     elseif ($x == 3) {echo 'orange_bg';} ?>">

     <?php the_title(); ?>
           </div>
         <div class="tile_text"><?php echo the_field('solutions_excerpt', $post_id );?></div>

       </div>
      </div>
     </div>
    <br />
     </a> <!-- closes the first div box -->

     <?php 
   if ($x == 3) {$x = 1;} else {$x ++;};
  endwhile;  ?>

   </div>