Title: Loop column positioning issue
Last modified: April 8, 2018

---

# Loop column positioning issue

 *  Resolved [labyrinthman](https://wordpress.org/support/users/labyrinthman/)
 * (@labyrinthman)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/loop-column-positioning-issue-2/)
 * I’m having trouble with listing posts, the columns look all messed up.
 * Code of the loop:
 *     ```
       <div class="container">
       		  <div class="row">
                           <div class="col-md-8">
       							<?php 
       						  $the_band = new WP_Query(array( 
       						   'posts_per_page' => 6, 
                                  'post_status'=>'publish',
                                  'paged=>'. get_query_var('paged'),
                                  'category_name'=>'reviews'
       						   )); 
       						  while ( $the_band->have_posts() ) : 
       						  $the_band->the_post();
       						 ?>
   
                               <div class="col-sm-4" >
                                   <div class="thumbnail text-center"> 
                                       <a class="active-link circle-img-width" href="<?php the_permalink();?>">
                                           <?php the_post_thumbnail('thumbnail',['class' => 'img-circle' ]);?>
                                       </a>
                                       <br>
   
   
                                       <button onclick="window.location='<?php the_permalink();?>';" href="<?php the_permalink();?>" class="draw"><?php the_title();?></button>
                                   </div>
   
                               </div>
                               <?php endwhile; ?>
       <!-- Add the pagination functions here. -->
       <?php wp_pagenavi();?>
                           </div>
                           <aside id="sidebar">
                          <?php get_sidebar();?>
                           </aside>
                       </div>
       	</div>
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Floop-column-positioning-issue-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [AddWeb Solution](https://wordpress.org/support/users/addweb-solution-pvt-ltd/)
 * (@addweb-solution-pvt-ltd)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/loop-column-positioning-issue-2/#post-10160129)
 * Hello labyrinthman,
 * Add below css code into your current active child theme’s style.css file or you
   can add additional css option in theme customizer.
 *     ```
       #posts .col-md-8 .col-sm-4 {
         height: 300px;
       }
       ```
   
 * Hope this will helps you.
 * Thanks.
 *  Thread Starter [labyrinthman](https://wordpress.org/support/users/labyrinthman/)
 * (@labyrinthman)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/loop-column-positioning-issue-2/#post-10160655)
 * Hello AddWeb Solution Pvt. Ltd.
 * Thank you for your response, it works.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Loop column positioning issue’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/newsmag/2.4.4/screenshot.jpg)
 * NewsMag
 * [Support Threads](https://wordpress.org/support/theme/newsmag/)
 * [Active Topics](https://wordpress.org/support/theme/newsmag/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/newsmag/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/newsmag/reviews/)

## Tags

 * [column](https://wordpress.org/support/topic-tag/column/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * 2 replies
 * 2 participants
 * Last reply from: [labyrinthman](https://wordpress.org/support/users/labyrinthman/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/loop-column-positioning-issue-2/#post-10160655)
 * Status: resolved