Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter flashlight

    (@flashlight)

    Brilliant, thanks! For the sake of anyone else encountering this, the final code looks like this:

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $offset = ($paged * 10);
    query_posts("offset=$offset"); ?>
    <?php while (have_posts()) : the_post(); ?>
    Thread Starter flashlight

    (@flashlight)

    Thanks Kafkaesqui. I’ve tried the method you describe, as well as multiplying the offset, but am not having success.

    Here’s the code I’m using

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    	$offset = ($paged * 10);
     	query_posts('showposts=10&offset=$offset'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <li><a href="<?php echo get_permalink() ?>"><?php the_title(); ?></a></li>
    <?php endwhile; ?>

    The offset is not working – I only get the first 10 posts, regardless of which page I’m on. If I echo $offset, I do get the proper value (ie 20 on page 2, 30 on page 3, etc), but that value is not being applied in the query_posts tag.

    Any help is most appreciated.

    Thread Starter flashlight

    (@flashlight)

    Thanks whooami. I happen to agree with you, but I’ve been over ruled on this one…

Viewing 3 replies - 1 through 3 (of 3 total)