WordPress.org

Ready to get started?Download WordPress

Forums

Previous and Next links for Archived pages (12 posts)

  1. reevo
    Member
    Posted 9 years ago #

    Hy Y'all
    I'm just wondering if there's a way to get 'next' and 'previous' links at the bottom of the page, you know what I mean?
    For instance, say I choose to show 30 posts per page, is there a wa to have a link to the NEXT 30 posts?
    Another example...if someone were to hit one of the archived pages which had, lets say 200 posts on it, could you limit the posts to say 30 with the next and previous links at the bottom?
    Any ideas or plugins available for the job?
    Cheers,
    Reevo

  2. TechGnome
    Moderator
    Posted 9 years ago #

    Just drop this into your index.php file where you want the links to be displayed:
    <p class="postnav"><?php posts_nav_link('::','<- Previous Page ', ' Next Page ->'); ?>
    That should do it for you. The number of posts will (should) default to how you have your options set up in the admin area.
    TG

  3. reevo
    Member
    Posted 9 years ago #

    mmm, Cheers TG, just tried that but doesn't seem to do anything at all. I added the code directly abover the 'Powered by WordPress' code right near the bottom. Any idea why?
    Cheers,
    Reevo

  4. reevo
    Member
    Posted 9 years ago #

    Just checked out your site and that's exactly what I need, could you tell me where you've placed you code so I can try in the same place?
    Cheers

  5. TechGnome
    Moderator
    Posted 9 years ago #

    Sure! Gimmie a sec.... gotta go look it up!
    TG

  6. reevo
    Member
    Posted 9 years ago #

    Cheers TG

  7. reevo
    Member
    Posted 9 years ago #

    Superb instructions, however, it doesn't seem to work for me :-(
    Don't know why!
    ...and that's the only thing you added to you index.php?

  8. TechGnome
    Moderator
    Posted 9 years ago #

    Oh, check your settings in the admin options area... on my site I have it set to 5 posts paged.
    Umm.... I guess I should ask, are using 1.2Mingus, or one of the nightlies?
    TG

  9. romancebyron
    Member
    Posted 9 years ago #

    mmm,today, my trouble like what reevo has said :
    <p class="postnav"><?php posts_nav_link('::','<- Previous Page ', ' Next Page ->'); ?> doesn't seem to do anything at all :-( Who can help us, please?

  10. romancebyron
    Member
    Posted 9 years ago #

    Who can help me, please?

  11. carthik
    Member
    Posted 9 years ago #

    Please upgrade to 1.5 and then the instructions should work. The code provided here is for 1.5. Otherwise you will have to visit scriptygoddess.com and search for the paging plugin she published sometime ago, and use that.

  12. mjdave
    Member
    Posted 9 years ago #

    Fantastic instructions, thank you very much. Works perfectly with 1.5.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.