• Hello,

    On the single post view on my site Sarsaparilla, at the bottom of the comments there’s currently links to the previous post and the next one.

    I want to insert a link to the home page between the two existing links.

    I’m hoping there’s a tag I can simply insert into the current section on the single.php page, which is this one, I think:
    <div class="navigation">
    <div class="alignleft"><?php previous_post('&laquo; %','','yes') ?></div>
    <div class="alignright"><?php next_post(' % &raquo;','','yes') ?></div>
    </div>

    Any advice gratefully received.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You could try to add between the left and right div something like:
    <div><a href="<?php bloginfo('home'); ?>">Home</a></div>

    Thread Starter lucytartan

    (@lucytartan)

    Thank you, Moshu – that’s working! When the page is viewed there is no space between the link to the Previous Post and the Home link, what should I do to fix that?

    If the Home link appeared on the line underneath the Previous / Next links, that would be fine too.

    cheers
    Laura

    Oops. I assumed the .navigation div has the same properties as in most of the themes, namely:
    display: block;
    text-align: center;

    – this should move the home-link to the center.

    Of course, with long title, the space would be minimal.

    For moving the homelink under…
    just put it AFTER the right div with a <br /> before it.

    Thread Starter lucytartan

    (@lucytartan)

    Thank you again! It’s good now.

    Laura

    Nope, I don’t like it ??
    If you add those two lines from above to the
    .navigation { blah blah...}
    in your stylesheet – the homelink will show up nicely in the middle ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Previous Home Next navigation on single post page’ is closed to new replies.