Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #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.




    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-->


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

    As you can see:


    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!



    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.




    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.