Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2487

    Hey guys,

    I’d like to have navigation buttons “Next” and “Previous” in each of my posts, how could I do that?

    For example, if you go to this page: http://wpwallpaper.com/dark/bluedroid/ I want the two buttons on it.

    Thanks!

    #38175

    Hey,

    you can use following code to achieve what you want:

    <?php previous_post(); ?>    <?php next_post(); ?>

    Insert it into single.php like:

    <?php previous_post(); ?>    <?php next_post(); ?>
    <?php edit_post_link('Edit', '', ''); ?>
    <!--end entry-content-->
    </div>

    #38176

    Thanks for the reply! Is there anyway to stylize this so the “Previous” and “Next” links are separated further apart?

    As you can see:

    http://wpwallpaper.com/dark/bluedroid/

    the link to the previous post and the link to the next post are close together. I want the Next post button to align right. I’m new to PHP so thanks for your patience and guidance!

    #38177

    Hey,

    have a look at this page: http://codex.wordpress.org/Template_Tags/posts_nav_link

    It tells you how to use and customize the code.

    #38178

    Thanks!

    #38179

    Glad that I could help you.

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

The topic ‘"Next" button in a post?’ is closed to new replies.