how to repair the loop ?
-
hi!
In my template, i’m making several calls to display last 5 posts in each category in my sidebar.
The problem is that these calls overwrite the main content to be shown, so that the main content always shows the first post, no matter what link i click on. If i remove the sidebar code, it works normal.How can i reset the loop ? Here is what i call in my sidebar
<div> <ul> <?php query_posts('cat=1&showposts=5'); while (have_posts()) : the_post(); ?> <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a> </li> <?php endwhile; ?> </ul> </div>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘how to repair the loop ?’ is closed to new replies.