Support » Fixing WordPress » "Next Posts" link not working

  • I cannot seem to get my “next posts” and “previous posts” links to work. At the bottom of my index.php I want visitors to navigate to “older posts” and “new posts”. Pretty simple right?

    Well I followed the advice in the Codex. But no luck. Instead, when you click on the “older posts” link, the home page reloads with the newest three posts, not the three after those.

    Any help would be really appreciated!! I know I’m missing something…

    Here’s what my loop is looking like:

    if ( is_home() ) {
    	query_posts( 'cat=-3' );
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    	<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    		<div class="date "><span class="floatleftdate"><?php the_time('M j') ?><br /><?php the_time('Y') ?></span></div>
    	    <h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>
    		<div class="date-inline meta"><?php the_time('F j, Y') ?></div>
    		<div class="entry">
    			<?php the_content('<div class="readmore">Read More »</div>'); ?>
    		<div class="clear">
    <?php endwhile; ?>
    <div class="navigation">
    	<div class="next-posts"><p><?php next_posts_link('Older Posts »') ?></p></div>
    	<div class="prev-posts "><?php previous_posts_link('« Newer Posts') ?></div>
    <?php else : ?>
    	<h2>Not Found</h2>
    <?php endif; ?>
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘"Next Posts" link not working’ is closed to new replies.