• I have the following script on my page where I get the latest six posts from a category:

    <?php query_posts(‘category_name=NAME&showposts=6’); ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php the_title(); ?>
    <?php endwhile; ?>

    This works perfect, but now I want to have a second loop from the same category that only shows the six posts after the first six posts that this code generates (so post 7 till post 12 from the category)

Viewing 1 replies (of 1 total)
  • First, I don’t know how to do that using the wordpress library, but this will do it.

    <?php $count = 0; ?>
    <?php query_posts('category_name=NAME&showposts=12'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php $count++;?>
    <?php if(count>6){?>
    <?php the_title(); } ?>
    <?php endwhile; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘showposts from category double loop’ is closed to new replies.