WordPress.org

Support

Support » How-To and Troubleshooting » Previous and Next links for Archived pages

Previous and Next links for Archived pages

  • reevo
    Member

    @reevo

    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

Viewing 11 replies - 1 through 11 (of 11 total)
  • TechGnome
    Moderator

    @techgnome

    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

    reevo
    Member

    @reevo

    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

    reevo
    Member

    @reevo

    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

    TechGnome
    Moderator

    @techgnome

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

    reevo
    Member

    @reevo

    Cheers TG

    reevo
    Member

    @reevo

    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?

    TechGnome
    Moderator

    @techgnome

    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

    romancebyron
    Member

    @romancebyron

    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?

    romancebyron
    Member

    @romancebyron

    Who can help me, please?

    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.

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

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Previous and Next links for Archived pages’ is closed to new replies.