• disecor

    (@disecor)


    How can I make navigation below each post? previous / next ?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • AddWeb Solution

    (@addweb-solution-pvt-ltd)

    Hello disecor,

    In WordPress two type of next and previous links generated by template tags :

    1. posts_nav_link() : This template tag used for non-single and non-permalink posts. These links are displayed in index page (or posts home page), archives, categories, and search results pages.
    Example : <?php posts_nav_link(' — ', __('&laquo; Newer Posts'), __('Older Posts &raquo;')); ?>

    2. previous_post_link() and next_post_link() : These templates tags is used in single and permalink posts.
    Example : <?php previous_post_link(); ?> <?php next_post_link(); ?>

    For more prefer WordPress Next and Previous Links

    Hope this will helps you.

    Thanks !

    Theme Author Guido

    (@guido07111975)

    Hi,

    First, thanks for your response here @addweb-solution-pvt-ltd ??

    You can add this directly above <?php comments_template(); ?> in files single and single-full:

    
    <div class="post-nav">
    	<div class="nav-prev"><?php previous_post_link(); ?></div>
    	<div class="nav-next"><?php next_post_link(); ?></div>
    </div>
    

    Guido

    ps. for changes like this one you should create a child theme otherwise you will loose these changes again when theme is updated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘previous next post’ is closed to new replies.