• Hi Everyone,

    I am looking to add previous and next buttons to my individual blog/journal posts.

    An example of what I would like to add can be seen here (notice the prev and next buttons for the individual post and how by click them takes you to the previous or next post):

    https://www.bluefuze.com/2010/11/29/portrait-of-my-daughter-work-in-progress/

    My blog/journal can be seen here (different theme than link above): https://illiam.com/journal

    And here is an individual post of mine from the blog/journal link above (this is where I would like to add the prev / next buttons for individual posts such as this one): https://illiam.com/graffiti

    Currently I have done this:

    In index.php, right before:
    <?php include(TEMPLATEPATH."/sidebar.php");?>

    I added this:

    <div class="navigation">
    <div class="alignleft" id="prevpostlink"><?php next_post_link('%link', '', TRUE); ?></div>
    <div class="alignright" id="nextpostlink"><?php previous_post_link('%link', '', TRUE); ?></div>
    </div>

    In my style.css I added:
    [CSS moderated as per the Forum Rules. Please just post a link to your site.]

    However, after doing this, the next arrow (the light blue arrow on the right) is showing up on my https://illiam.com/journal page and not for individual posts.

    I need help getting the arrow on the individual posts page and not on the main journal page. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • if your theme has a single.php, add the code there.

    Thread Starter qubed

    (@qubed)

    thanks alchymyth, that worked really, really well by switching it to the single.php –

    do you or anyone know how i would also add the arrows to the page of my individual posts for my portfolio posts?

    An individual portfolio post example can be seen here:

    https://illiam.com/portfolio/dough

    i do have a single-portfolio.php file if that is relevant, but i tried already placing the code in there and it didn’t seem to take so i didnt know if this was the right place or even if i was putting it in the right place within the template. thanks for the help and thanks for any future help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How To Add Previous / Next Links to Blog Posts (CSS Help)’ is closed to new replies.