• I’m using the most current version of Word Press with a custom theme. I’ve been using this theme for a few years now. I noticed today that the “next page” and “previous page” link aren’t showing. They were there last week … and I don’t remember changing anything offhand.

    Here is my index page. I went through it and can’t see what would be blocking the code from appearing.

    <?php get_header(); ?>
    
    	<div id="content" class="narrowcolumn">
    
    <?php include (TEMPLATEPATH . "/sticky.php"); ?>
    
    	<?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    
    			<div class="post" id="post-<?php the_ID(); ?>">
    			<div class="post-title">
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Lien permanent pour <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    				<p class="postinfo"><span class="infocom"><?php comments_popup_link('Post Your Comments', 'Read 1 comment', '% comments'); ?></span><span class="infodate"><?php the_time('F j Y') ?>   in <?php the_category(', ') ?><!-- par <?php the_author() ?> --></span>
    
    			</div>
    				<div class="entry">
    					<?php the_content('Read the rest of this entry &raquo;'); ?>
    				</div>
    
    			<p class="postmetadata">
    
    <b>Posted by <?php the_author() ?></b> | Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('Post Your Comments »', 'Read The 1 Comment »', 'Read % Comments »'); ?>
    
    			</div>
    
    		<?php endwhile; ?>
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Read More Blog') ?></div>
    			<div class="alignright"><?php previous_posts_link('Go Back A Page &raquo;') ?></div>
    		</div>
    
    	<?php else : ?>
    
    		<h2 class="center">Not Found</h2>
    		<p class="center">Sorry, but you are looking for something that isn't here.
    
    		<?php include (TEMPLATEPATH . "/searchform.php"); ?>
    
    	<?php endif; ?>
    
    	</div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    Edit: If I go to page/2/ there IS a link at the bottom for “back a page” but not “next page” ….. so that’s my screwup

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter frenchvanillacoffee

    (@frenchvanillacoffee)

    I don’t want to bump this but still need a little assistance please.

    As I said, if I go to /page/anything, the back link works fine, so somehow I broke the “next page” link

    Thread Starter frenchvanillacoffee

    (@frenchvanillacoffee)

    Ok, I replaced the index.php page and that does not fix the issue. So, it’s not coding in that page for some reason …. I’m thinking the recent upgrade from 2.02 to 2.3.2 did this, yet I upgraded other sites with the same script to the current one and it did not break

    Your’re missing the wp_link_pages() part, i think.

    Open the default theme and look for a line sort of like this:

    <?php wp_link_pages(array('before' => '<strong>Pages:</strong> ', 'after' => '
    ', 'next_or_number' => 'number')); ?>

    Copy it to your theme’s index.php, and page.php if you’re using it.
    I have it right underneat the_content().

    Thread Starter frenchvanillacoffee

    (@frenchvanillacoffee)

    <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?> is in page.php already but has never been in index.php

    I have the original file from the original theme ??

    Thread Starter frenchvanillacoffee

    (@frenchvanillacoffee)

    It was suggested I try with another theme, and I did. The problem is on the default theme, too, so I really suspect this has to do with the upgrade.

    Help!

    Thread Starter frenchvanillacoffee

    (@frenchvanillacoffee)

    This is also an issue on the category pages (I did open a separate thread about that but it was closed).

    On the category pages, only “next” appears but it goes to previous page.

    Actually, i said something totally stupid: the link_pages thing is for PAGES, that have been split into multiple parts. I now see you want to show (for example) 5 Posts on your home page, then have the “next page” button to link to posts 6-10.

    That’s done with the

    <div class="navigation">
    	<div class="alignleft"><?php next_posts_link('&laquo; Read More Blog') ?></div>
    	<div class="alignright"><?php previous_posts_link('Go Back A Page &raquo;') ?></div>
    </div>

    bit of code. Which is in your template. Which is strange … What does sticky.php do?
    What happens when you remove this line?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘“next page” and “previous page” stopped appearing’ is closed to new replies.