Title: Question About Multiple Loop Conditional
Last modified: August 18, 2016

---

# Question About Multiple Loop Conditional

 *  Resolved [pufftenticle](https://wordpress.org/support/users/pufftenticle/)
 * (@pufftenticle)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/question-about-multiple-loop-conditional/)
 * I am attempting to dictate the number of post excerpts seen on category templates.
   I’m reading the multiple loop page in the codex, but not really understanding
   what I’m doing wrong. I have found this example:
 *     ```
       // Get the last 10 posts in the special_cat category.
         <?php query_posts('category_name=special_cat&showposts=10'); ?>
   
         <?php while (have_posts()) : the_post(); ?>
           <!-- Do special_cat stuff... -->
         <?php endwhile;?>
       ```
   
 * I used this for the ‘special category’:
 * `<?php query_posts('category_name=11&showposts=4'); ?>`
 * but that returns a white page (just in the content area, the sidebars are fine).
 * I tried again using the rewind:
 * `<?php rewind_posts(); ?>`
 * still white page. help ?

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

 *  Thread Starter [pufftenticle](https://wordpress.org/support/users/pufftenticle/)
 * (@pufftenticle)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/question-about-multiple-loop-conditional/#post-646755)
 * I gave up too soon.
 * replaced with this:
 * `<?php query_posts('category_name=NAMEOFCATEGORY&showposts=4'); ?>`
 * and everything is great.
 *  Thread Starter [pufftenticle](https://wordpress.org/support/users/pufftenticle/)
 * (@pufftenticle)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/question-about-multiple-loop-conditional/#post-646759)
 * spoke too soon ? again ?
 * that php call above is pulling up the correct posts in the correct category and
   displaying them on the correct template. however, the movement to page 2 and 
   3 and beyond only brings up the same page. i’m using Lester Chan’s WP-PageNavi2.20
   plugin.
 * any ideas ?
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/question-about-multiple-loop-conditional/#post-646764)
 * Using query_posts kills the next/prev navigation – most of the times. There was
   some additional code posted how to correct that… I just can’t remember where.
 * As another idea: why not use the CQS (custom query string) plugin to set the 
   number of posts shown in different views?
 *  Thread Starter [pufftenticle](https://wordpress.org/support/users/pufftenticle/)
 * (@pufftenticle)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/question-about-multiple-loop-conditional/#post-646766)
 * i didn’t even think of that. i already had it installed. what an easy fix. thanks
   a bunch !

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

The topic ‘Question About Multiple Loop Conditional’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [pufftenticle](https://wordpress.org/support/users/pufftenticle/)
 * Last activity: [18 years, 7 months ago](https://wordpress.org/support/topic/question-about-multiple-loop-conditional/#post-646766)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
