multiple custom loops and pagination
-
I have to create a custom WordPress category.php page. I need a custom loop at the top pulling in the latest two posts in the category (these are styled differently). I then need a second custom loop pulling a second list of 10 latest posts in that category. the pagination then needs to work correctly.
I have gone through so many posts regarding the pagination issue with query_posts() but can’t seem to get anywhere, please help!!
here is what I am currently using:
<?php query_posts('posts_per_page=2'); if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <!--first loop stuff--> <?php endwhile; endif; ?> <?php query_posts('offset=2'); if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <!--second loop stuff--> <?php endwhile; ?> <?php include (TEMPLATEPATH . '/inc/nav.php' ); ?> <?php else : ?> <h2>Not Found</h2> <?php endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘multiple custom loops and pagination’ is closed to new replies.