Support » Fixing WordPress » “Previous Entries, Next Entries” code not working

  • I’m using V2.6.

    The code on my index.php template looks like this:

    <div class=”alignleft”>
    <?php next_posts_link(‘« Previous Entries’) ?>

    <div class=”alignright”>
    <?php previous_posts_link(‘Next Entries »’) ?>

    But the rendered page code in the browser looks like this – like the php code has been ignored, and no links show:

    <div class=”prevnext”>
    <div class=”alignleft”></div>
    <div class=”alignright”></div>

    Any help?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m not sure, but I think you might want to replace the >>’s by raquo’s (the code of the image).

    Sorry – that’s how it came out when I cut and pasted it into this forum.
    My code does have the proper &laquo code rather than the << but it’s not working.

    You need to put a “;” between the ) and ? in the code, and you need to pass the “%link” to the function and then the text that you like to show.

    Like this:

    <?php next_posts_link(‘%link’, ‘« Previous Entries’); ?>
    <?php previous_posts_link(‘%link’, ‘Next Entries »’); ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘“Previous Entries, Next Entries” code not working’ is closed to new replies.