• The frontpage of my blog uses the template home.php. It shows the latest post. I use <?php wp_link_pages(”) ?> for navigation between pages in the post (using the <!–nextpage–> tag).

    The weird thing is: <?php wp_link_pages(‘next_or_number=number’) ?> works fine, but <?php wp_link_pages(‘next_or_number=next’) ?> doesn’t show anything.

    I use the function <?php wp_link_pages(‘next_or_number=next’) ?> on single.php and page.php templates as well, were it works fine.

    This is my code:

    <?php /*
    Template Name: Home
    */ ?>
    
    <?php get_header(); ?>
    
    <div id="page">
    <?php include (TEMPLATEPATH . "/sidebar.php"); ?>
    <?php if (have_posts()) :
    query_posts('showposts=1');
    while (have_posts()) : the_post(); ?>
    
    <div id="date">
    	<div class="month"><?php the_time('M') ?></div>
    	<div class="day"><?php the_time('d') ?></div>
    </div>
    <h2><?php the_title(); ?> <a class="comments-link" href="#comments" title="<?php comments_number('Geen reacties','1 reactie','% reacties'); ?>">(<?php comments_number('0','1','%'); ?>)</a></h2>
    <div class="clearer"></div>
    
    <?php wp_link_pages('next_or_number=next') ?>
    
    <div class="entry">
    <?php the_content('Lees verder &raquo;
    '); ?>
    </div>
    <div class="clearer"></div>
    
    <?php $wp_query->is_single = true; ?>
    <?php comments_template(); ?>
    
    <?php endwhile; else: ?>
    	<h2 class="center">Niet gevonden</h2>
    <?php endif; ?>
    
    <?php include (TEMPLATEPATH . "/footer.php"); ?>

Viewing 6 replies - 1 through 6 (of 6 total)
  • Try

    next_or_number=text

    Thread Starter Anderhalv

    (@anderhalv)

    Thanks for the suggestion, but next_or_number=text doesn’t work either.

    And are you trying to paginate pages withing pages, not pages within posts?

    Thread Starter Anderhalv

    (@anderhalv)

    I’m trying to paginate pages within posts (for long posts).

    In fact, I use it for both posts and pages. And wp_link_pages(‘next_or_number=number’) and wp_link_pages(‘next_or_number=next’) work fine in single.php and page.php. Only for home.php wp_link_pages(‘next_or_number=next’) doesn’t work, but wp_link_pages(‘next_or_number=number’) does.

    I don’t get it 🙂

    Well pat yourself I think its a bug – tried it myself, dont worketh.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wp_link_pages(‘next_or_number=next’) doesn’t work on home.php’ is closed to new replies.