query_posts() troubleshooting
-
Hi,
I meet a bug with my query_posts loop. The same loop is used for index.php, category.php and tag.php
On my index, when I click on a tag link or a category link in order to display the list of posts related to this tag or category, I’ve got the same results than the index and not the list of the posts of the category or the tag.
<?php query_posts( array( 'ignore_sticky_posts' => 1, 'paged' => get_query_var('paged') ) ); ?> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <!-- do stuff here --> <?php endwhile; ?> <?php else : ?> <!-- message --> <?php endif; ?> <?php wp_reset_query(); ?>
When I remove the query_posts, it works fine.
Do you have any idea of what could be the problem ?
Any help would be greatly appreciated !
Viewing 15 replies - 1 through 15 (of 15 total)
Viewing 15 replies - 1 through 15 (of 15 total)
- The topic ‘query_posts() troubleshooting’ is closed to new replies.