Support » Fixing WordPress » next/previous links

  • 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

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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?

    hanni

    (@hanni)

    Volunteer Moderator

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

    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

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

    Moderator Ryan Boren

    (@ryan)

    WordPress Dev

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

    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?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘next/previous links’ is closed to new replies.