• I have my blog index set up with a custom loop like this:

    <?php global $post;  $myposts = get_posts('numberposts=1');  foreach($myposts as $post) :  setup_postdata($post);  ?>
    ...<?php the_content('Click to read more...'); ?>...
    <?php endforeach; ?>
    
    <?php global $post; $myposts = get_posts('numberposts=3&offset=1'); foreach($myposts as $post) : setup_postdata($post); ?>
    ...<?php the_excerpt(); ?>...
    <?php endforeach; ?>

    This makes it display the full text of the latest post, and just below it, the next three posts are just excerpts.

    Works great, until you try to go to the previous posts, via the next_posts_link tag. Click on it, and because this is a custom loop, the “previous posts” page displays the exact same posts.

    Is there a way I can make that link display a different loop, so that I could for example just have the next 10 excerpts on the next/previous pages that are not the blog index?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Next/Previous Links in Custom Loop’ is closed to new replies.