stop query_posts
-
hey everyone
i want something that i don’t know much how to explain, but here we go.
i’m using a
$counter
variable, defined before the loop:<?php $counter = 0; ?>
everypost adds 1 to the counter:
<?php $counter = $counter + 1; ?>
but, if the post is in category 6, it adds one more:
<?php if (in_category('6')) { ?> <?php $counter = $counter + 1; ?>
well, i do it because i want that when it reaches 7, it shows up a page:
<?php if(7 == $counter ) : include (TEMPLATEPATH . '/BREAKING-NEWS.php'); endif; ?>
here is my question: i want to stop
query_posts
after counter reaches 10, but i can’t do it by myself. do you guys suggest something?thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘stop query_posts’ is closed to new replies.