• I edited my index.php page. The first section is my addition and I commented out the old code. It’s almost right. The Next Page Previous Page are at the bottom of each page. But — it ia also under EACH post. I’m sure I just didn’t move something but what needs to be done to fix this?

    <?php the_content()?>
    </div>
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&raquo; Next Page &raquo;') ?></div>
    			<div class="alignright"><?php previous_posts_link('&laquo; Previous Page &laquo;') ?></div>
    		</div>
    
    <!-- end post -->
    
    <?php endwhile; ?>
    
    <!-- <p id="postnav">
    	<?php next_posts_link('
    Next Page'); ?> &nbsp;
    	<?php previous_posts_link('Previous Page'); ?>
    </p> -->
    
    <?php else : ?>
    
    <div class="notfound">
    	<h2>Not Found</h2>
    	<p>Sorry, but you are looking for something that is not here.</p>
    </div>
    <?php endif; ?>
    <?php
    
    get_sidebar();
    get_footer();
    ?>

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • C W (VYSO)

    (@cyril-washbrook)

    Move your next/previous markup below <?php endwhile; ?>, just like the lines that you’ve commented out. The reason is that everything between

    while ( have_posts() )

    and

    endwhile;

    is repeated for every single post that is displayed on that page.

    Thread Starter SickSquirrel

    (@sicksquirrel)

    Thank you! That fixed it but I thought there was a colored separator line between posts. I’m not positive though. It may be in my own mind ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Slight error when editing file’ is closed to new replies.