Support » Fixing WordPress » Display Next & Previous posts within single.php

  • Resolved flint_and_tinder


    Hi All,

    I wonder if anyone can help here?

    What I want to do is create links to the previous and next posts on the single.php pages. However, I do not want them to be just text. Ideally I would like each item to contain the following:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Is there anyway I can do this using either the get_adjacent_posts or get_previous_post/get_next_post snippets? If so, can anyone explain how?

    I’ve been trawling Google all day for a solution to this to no avail.

    Many thanks,


Viewing 1 replies (of 1 total)
  • Since I can’t see your code, I can’t be exactly sure what you want.

    You can use an image in previous/next_post_link by putting the html for the image in the second parameter, like this:

    <div class="nav-previous"><?php previous_post_link( '%link', '<img src=""',true ); ?></div>

    If you want a link to all previous posts, please give a little detail or put the code in a pastebin and post a link to it here.

Viewing 1 replies (of 1 total)
  • The topic ‘Display Next & Previous posts within single.php’ is closed to new replies.