Title: Help with multiple loops!
Last modified: August 19, 2016

---

# Help with multiple loops!

 *  [leah4590](https://wordpress.org/support/users/leah4590/)
 * (@leah4590)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/help-with-multiple-loops-1/)
 * I’m trying to make my website more accessible to people and want to have three
   columns showing three lots of posts from different categories.
 * My WIP is here: [http://tsms.tenerifeholidayapartments.biz/](http://tsms.tenerifeholidayapartments.biz/)
   and I want each column (left, right, middle) to show a different category (book
   review, book news, other) but I don’t really understand the whole looping business.
   I’ve read & re-read the loop post here on WP but I don’t understand it so any
   help is appreciated. Here is my current main index template code:
 *     ```
       <?php get_header(); ?>
   
       <div id="content2">  
   
       <?php if (have_posts()) : ?>
   
       		<?php while (have_posts()) : the_post(); ?>
   
       			<div class="post" id="post-<?php the_ID(); ?>">
       				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
       <img src="http://chicklitreviews.com/wp-content/themes/chicklitreviews2%20(2)/images/PostDateIcon.png"> Posted on <?php the_time('F jS, Y') ?> by <?php the_author() ?>
   
       				<div class="entry">
       					<?php the_content('Read the rest of this entry &raquo;'); ?>
       				</div>
   
       				<p class="postmetadata"><img src="http://www.famfamfam.com/lab/icons/mini/icons/icon_attachment.gif">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
       			</div>
   
       		<?php endwhile; ?>
   
       		<div class="navigation">
       			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
       			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
       		</div>
   
       	<?php else : ?>
   
       		<h2 class="center">Not Found</h2>
       		<p class="center">Sorry, but you are looking for something that isn't here.</p>
       		<?php include (TEMPLATEPATH . "/searchform.php"); ?>
   
       	<?php endif; ?>
       </div>
       	<div id="content">
   
       	<?php if (have_posts()) : ?>
   
       		<?php while (have_posts()) : the_post(); ?>
   
       			<div class="post" id="post-<?php the_ID(); ?>">
       				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
       <img src="http://chicklitreviews.com/wp-content/themes/chicklitreviews2%20(2)/images/PostDateIcon.png"> Posted on <?php the_time('F jS, Y') ?> by <?php the_author() ?>
   
       				<div class="entry">
       					<?php the_content('Read the rest of this entry &raquo;'); ?>
       				</div>
   
       				<p class="postmetadata"><img src="http://www.famfamfam.com/lab/icons/mini/icons/icon_attachment.gif">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
       			</div>
   
       		<?php endwhile; ?>
   
       		<div class="navigation">
       			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
       			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
       		</div>
   
       	<?php else : ?>
   
       		<h2 class="center">Not Found</h2>
       		<p class="center">Sorry, but you are looking for something that isn't here.</p>
       		<?php include (TEMPLATEPATH . "/searchform.php"); ?>
   
       	<?php endif; ?>
   
       	</div>
   
       <div id="content3"><?php if (have_posts()) : ?>
   
       		<?php while (have_posts()) : the_post(); ?>
   
       			<div class="post" id="post-<?php the_ID(); ?>">
       				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
       <img src="http://chicklitreviews.com/wp-content/themes/chicklitreviews2%20(2)/images/PostDateIcon.png"> Posted on <?php the_time('F jS, Y') ?> by <?php the_author() ?>
   
       				<div class="entry">
       					<?php the_content('Read the rest of this entry &raquo;'); ?>
       				</div>
   
       				<p class="postmetadata"><img src="http://www.famfamfam.com/lab/icons/mini/icons/icon_attachment.gif">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
       			</div>
   
       		<?php endwhile; ?>
   
       		<div class="navigation">
       			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
       			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
       		</div>
   
       	<?php else : ?>
   
       		<h2 class="center">Not Found</h2>
       		<p class="center">Sorry, but you are looking for something that isn't here.</p>
       		<?php include (TEMPLATEPATH . "/searchform.php"); ?>
   
       	<?php endif; ?>
       </div>
       <?php get_footer(); ?>
       </div>
       ```
   

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

 *  [ben.blodgett](https://wordpress.org/support/users/benblodgett/)
 * (@benblodgett)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/help-with-multiple-loops-1/#post-1382739)
 * You need to use query posts, here is the wordpress resource page on how [http://codex.wordpress.org/User:JamesVL/query_posts](http://codex.wordpress.org/User:JamesVL/query_posts)
 * It will look something like..
 *     ```
       <? query_posts('cat=1');>
       <? query_posts('cat=2');>
       <? query_posts('cat=3');>
       ```
   
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/help-with-multiple-loops-1/#post-1382766)
 * [http://perishablepress.com/press/2008/09/01/multiple-loops-and-multiple-columns-with-wordpress/](http://perishablepress.com/press/2008/09/01/multiple-loops-and-multiple-columns-with-wordpress/)
 * is a good multi column/multiloop tutorial
 * used in conjunction with the info in the link above, or
    [http://www.catswhocode.com/blog/multiple-wordpress-loops](http://www.catswhocode.com/blog/multiple-wordpress-loops)
 * should get you somewhere

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

The topic ‘Help with multiple loops!’ is closed to new replies.

 * 2 replies
 * 3 participants
 * Last reply from: [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * Last activity: [16 years, 3 months ago](https://wordpress.org/support/topic/help-with-multiple-loops-1/#post-1382766)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
