WordPress.org

Ready to get started?Download WordPress

Forums

next/previous links (7 posts)

  1. magur0sashimi
    Member
    Posted 9 years ago #

    on my site I have a popup window for each individual entry and would like to put a next/previous entry link on each page.. the only thing I'm having trouble with is the code for the loop and the link, can someone help me with this? I could probably figure it out eventually but after spending all day putting my site up I would just like some help x_x if someone could give me a sample code for it then I would greatly appreciate it =D thanks, -suz

  2. magur0sashimi
    Member
    Posted 9 years ago #

    um.. I don't think that was what I was asking.. here's a better (relevant) question: on wiki it says that next_link and previous_link have to be used in the loop, but I'm trying to put them on each individual entry's page.. what exactly should I be adding to that page?

  3. hanni
    Volunteer Moderator
    Posted 9 years ago #

    Put this on your index
    <?php if ($single) { ?>
    <?php previous_post('« %', '');?><?php next_post('% »', ''); ?>
    <?php } ?>

  4. Anonymous
    Unregistered
    Posted 9 years ago #

    thank you =D that works lovely. now the only thing is, can I change that to link to the comments page for the next/previous post? if you don't get what I'm saying, go to http://strawberry-pie.com/strawberry/index.php, click on the comments link and there's a small popup that displays the entry and comments. the next post link is on that page and when you click on it .. well it's ugly. I realize I might have to change the structure of my posts but if I can change this without having too that would be great

  5. magur0sashimi
    Member
    Posted 9 years ago #

    sorry, wasn't logged in for that post but that is me

  6. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    Oops, my response was to another post. Cut-and-paste it in the wrong window.

  7. iand
    Member
    Posted 9 years ago #

    It works on my test site http://www.members.lycos.co.uk/wheeledsquirel/blog which still has the original index.php. Could I be missing something from index.php that is making it not work?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.