• I have attempted to make a theme from scratch. So far, it is good, but I have only one issue that is keeping me from launching my website. When you click the next/previous link on the front page, it loads the http://domain.com/page/2 link..but it shows all of the same posts.

    I have it set to only show 3 posts per page in the reading options, and I have a code that I pretty much copied and paste and don’t know too much about the functions and such, in my index.php. Since im not entirely too sure what I am doing, I have a hard time following the replies on other topics of people experiencing the same issue.

    This is my code:

    <?php query_posts(''); ?>
    		<div class="post extra show_more">
    		<?php if (have_posts()) : ?>
    		<?php while (have_posts()) : the_post(); ?>
    		    <div class="headline">
    			  <h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
    			  <p class="post-date"><?php the_time ('F jS, Y'); ?></i>  </p>
    		    </div>
    			<div class="post-body">
    				<p><p><?php if (has_post_thumbnail() ) { ?><a href="<?php the_permalink(); ?>" class="post-thumbnail"><?php the_post_thumbnail(array (200, 200, true), array('class' => 'alignleft'), array('alt' => 'image')); ?></a></a>
    <?php } else { ?>
    		<?php } ?></p>
    <p><?php the_excerpt(''); ?></p></p>
    <div align="right"><a href="<?php comments_link(); ?>"><?php comments_number('No Comments', '1 Comment', '% Comments' ); ?></a> | <a href="<?php the_permalink(); ?>">Read more</a><br><Br></div><hr /><br>
    			</div>
    <?php endwhile; ?>
    <div class="navigation">
    <p class="previous"><?php next_posts_link('Previous Entries') ?></p>
    <p class="next"><?php previous_posts_link('Next Entries') ?></p>
    </div>
    		</div>
    
    <?php endif; ?>

    So i need to figure out what is wrong, and how make it so when someone clicks the previous/next button that it shows the other posts, not the same 3, most recent posts.

The topic ‘Next/Previous links showing the same posts’ is closed to new replies.