• Hey everybody,

    Sorry to bug everyone with this, but it’s driving me nuts. I have two loops running at http://robo.clickpopmedia.com, and want to paginate the second loop, but it isn’t working.

    my code is:

    ?php query_posts('showposts=1'); ?>
    	<?php while (have_posts()) : the_post(); ?>
    		<div class="feature"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><img src='<?php $key="thumb"; echo get_post_meta($post->ID, $key, true); ?>' /></a></div>
    	<?php endwhile; ?>
    
    	<div style="float:left; width:165px;"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/text.png" /></div>
    
    <?php query_posts($query_string . "cat=&amp;showposts=2&amp;offset=1"); ?>
    	<?php if (have_posts()) : ?>
    		<?php while (have_posts()) : the_post(); ?>
    
    		<div class="thumb"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><img src='<?php $key="thumb"; echo get_post_meta($post->ID, $key, true); ?>' /></a></div>
    
    		<?php endwhile; ?>
    
    	<?php endif; ?>
    
    	<div class="navigation">
    		<div class="alignleft"><?php next_posts_link('next') ?></div>
    		<div class="alignright"><?php previous_post_link('%link', 'Previous in category', TRUE, '12'); ?></div>
    	</div>

    When I try and browse to the next page, it brings me to a 404. It’s maddening because I’ve done the same thing before, am I just missing something?

    Thanks a lot everybody.

  • The topic ‘Pagination problem with multiple loops’ is closed to new replies.