• I have a site where the main page is split into 5 columns. The first 4 columns display a specific category and they do it using:

    <?php echo get_cat_name(6); ?>
    <?php if (have_posts()) : ?>
    <?php query_posts('cat=6&showposts='.get_option('posts_per_page')); ?>
    <? while (have_posts()) : the_post(); ?>
    <!--- STUFF ---!>
    <?php endwhile; endif; ?>

    I’ve ran through the Loop section on the codex and stored the original post query before all of these columns using

    <?php $temp_query = $wp_query; ?>
    <!--- 4 Columns ---!>
    <?php $wp_query = $temp_query; ?>

    after the last bit, I put in my 5th column where I want all of the posts. What happens, though, is that it only displays the posts from the 4th column. I’ve also tried using <?php rewind_posts(); ?> to no avail.

    Is there anything else I should be trying to get it to work?

  • The topic ‘multiple loops causing problems’ is closed to new replies.