Pagination loop issue
-
I have the reading settings in the admin set to only show 2 posts. I also have a query in the global loop to exclude some categories:
query_posts("&cat=-179,-4,-70,-19" );This query will be on the front pageand I’m trying to continue that loop on other pages because I only want that those specific posts to show and I want more than just two to show. So the code is:
query_posts($query_string . "&posts_per_page=10" );Now what is happening is the frontpage works, however it seems to always get screwed up during the pagination. What am I doing wrong?
Here is the simplistic version of the code:
<?php if ( $paged < 2 ) { // Do stuff specific to first page?> <? query_posts("&cat=-179,-4,-70,-19" ); while ( have_posts() ) : the_post(); ?> <?php the_title(); ?> <?php endwhile; ?> <? } else { ?> <? query_posts($query_string . "&posts_per_page=10" ); while (have_posts()) : the_post(); ?> <?php the_title(); ?> <?php endwhile; ?> <? } ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Pagination loop issue’ is closed to new replies.