Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • #4521

    HI there,

    I would love the browsers of my website to be able to navigate forwards and back between portfolio posts from within a portfolio post.

    For example, if you take a look at one of my portfolio posts here:

    I would love to have a link at the top right above the line labeled ‘Next’ which would take the user to the next project along, (

    Is this achievable?

    Many Thanks,




    replace – in single.php replace:

    the_content('


    the_content('
    previous_post_link('%link', 'Next project', TRUE); ?>
    <?php next_post_link('%link', 'Next project', TRUE); ?>

    This will add next and previous post buttons.


    Hey thanks for your reply.. I am having trouble finding where I need to replace this?

    Here is my single.php.

    (removed to avoid formatting issues – Dude)

    Many Thanks,


    I adjusted the code above.


    Thank you so much! That works a treat :) (Purchase code hidden if logged out) /

    As you can see it has added the ‘Next : Previous’ Links at the bottom of the posts. I was wondering if there was a way to have these appear above the main lightbox image, in the same style as where it says ‘Produced at RealtimeUK for AKQA’ but justified to the right? That would be perfect!!

    The style of the line of text is a custom value I have added to the posts ‘punchline’.

    If this cant be achieved easily, I would like to be have the Next & Previous links to remain at the bottom but be justified to the right?

    Any help appreciated..

    Thank you.


    Mmm….try to replace:

    echo $preview; // echo the preview image


    previous_post_link('<h6 style="float:right;">%link</h6>', 'Next project', TRUE); ?>
    <?php next_post_link('<h6 style="float:right;">%link</h6>', 'Next project', TRUE); ?>
    echo $preview; // echo the preview image


    Thank you for all your help so far :)

    I have tweaked it to best suit my site and almost have it working exactly how I want it to.

    Functionality wise it is perfect, I just need to tweak aesthetics now!

    I have slightly edited the code you gave me, this is what I am using.

    echo $preview; // echo the preview image

    the_content(‘

    previous_post_link(‘<h6 style=”float:right;”>%link</h6>’, ‘Next project’, TRUE); ?>

    <?php next_post_link(‘<h6 style=”float:left;”>%link</h6>’, ‘Previous project’, TRUE); ?>

    If you take a look at one of the portfolio posts, such as: you can see the ‘Previous & Next’ links at the bottom aligned to the right and left. The only thing is, they are not on the same line! If this could be resolved so that they are both on the same line whilst remaining aligned right and left as there are now that would be perfect!

    The other small issue is I would like these two links to always appear with a line above them to separate them somewhat from the post. To achieve this currently I have to add a ul /ul to the bottom of the post. If this could be achieved automatically that would be brilliant.

    Many Thanks, Nearly there :)


    I really hope this is achievable, this is the only thing left I would like to change on my site..

    Any help really appreciated!



    I just wanted to say that I think I have solved my issue by using the following code..

    ‘echo $preview; // echo the preview image

    the_content(‘Read more’); ?>

    <div style=”width:860px;”>

    <span style=’float: right;’>

    <?php previous_post_link(‘<h6>%link</h6>’, ‘Next project’, TRUE); ?></span>

    <span style=’float: left;’>

    <?php next_post_link(‘<h6>%link</h6>’, ‘Previous project’, TRUE); ?></span>




    Glad that you found a solution :)

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Adding 'Next' & 'Previous' navigation links to individual Portfolio posts?’ is closed to new replies.