Problem with multiple loops
I use one loop to list posts from only 1 category in the sidebar, than I use another loop to show all the posts on index page.
For some reason, after I started to used two loops, my “if” is not reacting to have_posts() anymore and jumps to “else” – which is 404 Page display. What can be wrong?
It looks like:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<– Code –>
<?php endwhile; ?>
<?php else : ?>
<– 404 Page display –>
<?php endif; ?>
- The topic ‘Problem with multiple loops’ is closed to new replies.