Movenext in loop without counting
-
Hi all,
not sure if this is possible or not but here’s what I’m trying to do:
I have:<?php elseif (in_category(48)) : ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
…etc, etc
This loops through 10 times and outputs in 2 lines of output with the post excerpt etc.
What i’m trying to do is exclude posts from certain categories within the loop, which is easy enough, but i DON’T want the loop to count. i.e. it outputs 4 then comes across one I want to exclude and it skips over it but will still output a further 6.
at the moment it’s looping through and just showing 9 as i’m skipping one because I don’t want to display, which is half-right.
Hope i’ve explained that ok!
- The topic ‘Movenext in loop without counting’ is closed to new replies.