Support » Fixing WordPress » adding link to older posts

  • Resolved slgolden


    I searched the forum on this topic and was directed to the page explaining the next post/previous post links, but I can’t understand it. It’s marked as in need of editing, and that’s really true.

    I understand that I need to edit the index.php file of my theme, but I don’t know where to insert the links in that file.

    Do I just add
    <?php previous_post(‘« « %’, ”, ‘yes’); ?>
    | <?php next_post(‘% » » ‘, ”, ‘yes’); ?>

    and where do I add it?

    Thank you for any help

Viewing 5 replies - 1 through 5 (of 5 total)
  • esmi


    Forum Moderator

    Do I just add […]

    Yes – although now that you have read the Codex page on these template tags, you’ll be able to edit the parameters according to your needs.

    where do I add it?

    Right at the end of the Loop. After the <?php endwhile; ?> and before the <?php endif; ?>.

    Thank you so much! I managed to do it, although I found the code only worked when I put it after the <?php endif; ?>.



    It’s still not working for me. All I see is the “|”
    I tried it before and after the ‘<?php endif; ?>’



    Code is working, but is totally in the wrong place. Check it out at
    scroll all the way down, how do I get them centered? Is there a way to switch the little arrows?

    oh here’s the code:
    ‘<?php endwhile; ?>

    <?php else : ?>
    <h2 class=”center”>Not Found</h2>
    <p class=”center”>Sorry, but you are looking for something that isn’t here.</p>
    <?php include (TEMPLATEPATH . “/searchform.php”); ?>
    <?php endif; ?>
    <?php previous_posts_link(‘Newer Entries »’) ?> <?php next_posts_link(‘« Older Entries’) ?>



    I got it with a simple ‘<p align=”center”>’ is getting the arrows correct..

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘adding link to older posts’ is closed to new replies.