• Hello everyone

    I have the following issue with a theme I am developing:

    the following piece of code

    <?php previous_posts_link(); ?>
    <?php next_posts_link(); ?>

    does not return any result.

    If I use

    <?php previous_post_link(); ?>
    <?php next_post_link(); ?>

    It displays the next post… I’m quite puzzled. Why wouldn’t it work? any suggestion?

    The final part of my loop would be like:

    <?php endwhile; ?>
    
    <div class="row prevnextsection">
    <div class="sixcol"><span class="prev"><a href="#"><?php previous_posts_link(); ?></a></span></div>
    <div class="sixcol last"><span class="next"><a href="#"><?php next_posts_link(); ?></a></span></div>
    </div>
    
    <?php endif; ?>

    heeeelp! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • <?php previous_posts_link(); ?>
    <?php next_posts_link(); ?>

    I think the above should be used on archive pages and the following on single post pages.

    <?php previous_post_link(); ?>
    <?php next_post_link(); ?>

    That is how they are used in the twenty eleven theme.

    Thread Starter Alessandro Muraro

    (@cupevampe)

    That’s how I was trying to do it… ??

    Thread Starter Alessandro Muraro

    (@cupevampe)

    My fault, the number of posts was set to 20, no wonder it wasn’t outputting nothing…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘next_posts_link/previous_posts_link return blank!’ is closed to new replies.