WordPress.org

Ready to get started?Download WordPress

Forums

Previous/Next (12 posts)

  1. khackett
    Member
    Posted 9 years ago #

    Hi. Me again.

    So dumb whatever your answer is down. :)

    How do I get previous & next links at the bottom of entries?

  2. Matt Mullenweg
    Troublemaker
    Posted 9 years ago #

    I did this search which returned some other forum threads and a few plugins:

    http://www.google.com/search?q=wordpress%20next%20previous%20links

  3. khackett
    Member
    Posted 9 years ago #

    I did such a search; my problem is that I don't UNDERSTAND what these things mean. Totally php stupid. :P

  4. Kafkaesqui

    Posted 9 years ago #

    Edit your index.php template, and in it place those tags within The Loop:

    http://codex.wordpress.org/The_Loop

    See example on this page for how to get them to appear only on a single post page:

    http://codex.wordpress.org/Template_Tags/next_post

  5. khackett
    Member
    Posted 9 years ago #

    Okay, I see where the code needs to go, but when I put it there, nothing shows up. I changed my layout to make it single post (I think?)... what's up?

  6. Kafkaesqui

    Posted 9 years ago #

    I'm seeing it at the top of each individual post. Something like:

    "MIA: The Little Banner Line Thing | Home | Bam!"

  7. khackett
    Member
    Posted 9 years ago #

    I don't see it at all!

  8. Empty your browser cache.

  9. khackett
    Member
    Posted 9 years ago #

    Nope. Not there.

  10. khackett
    Member
    Posted 9 years ago #

    Anyone?

  11. Lorelle
    Member
    Posted 9 years ago #

    First, thanks for bringing this up as it has annoyed me for ages that I couldn't get this to work and now it does.

    The info at http://codex.wordpress.org/Template_Tags/next_post helped me tons - totally. Here is the code I used, following the helpful info, to make it work. Now, you might not know php, but hopefully you can recognize the HMTL and CSS where I jazzed it up a little to look better.

    <?php if ($single) { ?>
    <p class="prevnext"><?php previous_post('%', '<b>PREVIOUS:</b> ', 'yes'); ?> <?php _e("<span>&bull;</span>"); ?> <?php next_post('%', '<b>NEXT:</b> ', 'yes'); ?>

    In my CSS class, I have it set to have a border on top and bottom and be 80% of the default font size with a span to make the bullet (a circle) blue. You can see it in action at http://www.cameraontheroad.com/wordpress/ and I did a search through my index.php for

    php if ($single)

    and pasted the previous/next statement in there. Worked great.

  12. khackett
    Member
    Posted 9 years ago #

    Awesome. I figured it out too. With the extensive help of this board. :)

    Now I haveta figure out how to make my silly lil Custom Fields to not be in one line...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.