Title: Two posts per &#8220;row&#8221;
Last modified: August 19, 2016

---

# Two posts per “row”

 *  [mYrAn](https://wordpress.org/support/users/myran/)
 * (@myran)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/two-posts-per-row/)
 * Hi! Iv’e modified the post page so that it shows two posts per row, like this:
 * post 1 | post 2
    post 3 | post 4
 * and so on. For some reason it doesnt post it that way, it randomly puts them 
   in unorder. For example:
 * post 3 | post 1
    post 2 | post 4
 * Heres my code
 *     ```
       <div id="content_inner">
           	<h1><?php single_cat_title(); ?></h1>
           	<div id="context">
               	<div class="catext"><?php echo category_description(); ?></div>
               	<?php if (have_posts()) : while(have_posts()) : $i++; if(($i % 2) == 0) : $wp_query->next_post(); else : the_post(); ?>
               	<div id="vanster">
                   	<div id="centering">
                   		<?php the_content(); ?>
                       </div>
                   	<div id="bildtext">
                   		<?php the_tags('Konstn&auml;r: ', ', ', '<br />'); ?> Kategori: <?php the_category(', ') ?>
                   	</div>
                   </div>
                   <?php endif; endwhile; else: ?>
                   <div id="texter">
                   	Tyv&auml;rr har vi just nu inget av visa h&auml;r i "<?php single_cat_title(); ?>".
       			</div>
                   <?php endif; ?>
                   <?php $i = 0; rewind_posts(); ?>
       			<?php if (have_posts()) : while(have_posts()) : $i++; if(($i % 2) !== 0) : $wp_query->next_post(); else : the_post(); ?>
                   <div id="hoger">
                   	<div id="centering">
                   		<?php the_content(); ?>
                       </div>
                       <div id="bildtext">
                   		<?php the_tags('Konstn&auml;r: ', ', ', '<br />'); ?> Kategori: <?php the_category(', ') ?>
                   	</div>
                   </div>
                   <?php endif; endwhile; else: ?>
       			<?php endif; ?>
           	</div>
       ```
   
 * Can someone with experience with php make it do what i want? Thank you very much
   in advance!

Viewing 1 replies (of 1 total)

 *  Thread Starter [mYrAn](https://wordpress.org/support/users/myran/)
 * (@myran)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/two-posts-per-row/#post-1300394)
 * Bump :c

Viewing 1 replies (of 1 total)

The topic ‘Two posts per “row”’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [mYrAn](https://wordpress.org/support/users/myran/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/two-posts-per-row/#post-1300394)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
