WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Next_posts_link not working (2 posts)

  1. peder77
    Member
    Posted 1 year ago #

    Why is the next and previous link not working on this loop.

    <?php echo "<p>". $query_string. "</p>" ?>
            <?php echo "<p>" . $paged . "</p>"; ?>
    
            <?php query_posts("posts_per_page=2"); ?>
            <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
            <!-- the loop -->
            <?php the_title(); echo "<br>"; ?>
            <?php endwhile; endif; ?>
    
           <?php previous_posts_link() ?>
    	<?php next_posts_link() ?>

    [closed as duplicate - please continue with the original topic http://wordpress.org/support/topic/pagenation-for-custom-loop?replies=1 ]

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Put them inside the loop

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.