• Resolved markoburns

    (@markoburns)


    Hi – In my categories all my next page/previous page links work fine, but on the homepage after clicking next page they just show the 1st page content over and over even though the url shows https://www.website.com/page/2/ etc.,

    I presume this is come kind of query error? Should I be using a separate template for categories and index with a separate query?

    here my index.php:

    <?php get_header(); ?>
    
    	<?php get_sidebar(); ?>
    
    	<div id="content" class="narrowcolumn" role="main">
    
    	<?php if (have_posts()) : ?>
    
    	  <?php
       if (is_home()) {
          query_posts("cat=-3");
       }
    ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    			<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    
    				<div class="entry">
    					<?php the_content('Read the rest &raquo;'); ?>
    				</div>
    
    			</div>
    
    		<?php endwhile; ?>
    
    		<div class="navigation prevnext">
    			<div class="alignright"><?php next_posts_link('Next Page &raquo;') ?></div>
    			<div class="alignleft"><?php previous_posts_link('&laquo; Previous Page') ?></div>
    		</div>
    
    	<?php else : ?>
    
    		<h2 class="center">Not Found</h2>
    		<p class="center">Sorry, but you are looking for something that isn't here.</p>
    		<?php get_search_form(); ?>
    
    	<?php endif; ?>
    
    </div>
    
    <?php get_footer(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘next page links on HP looping error’ is closed to new replies.