Next Post Link (5 posts)

  1. 14ner
    Posted 6 years ago #

    Hi Everyone,

    I am having trouble with my next post link and previous at the bottom of the page.

    Here is the code I have now
    <div class="right"><?php next_posts_link('Next Page »') ?></div>

    This link takes me to:

    On the page is the first 5 post again.

    The real page 2 link is

    Any thoughts?

    Thank You,


  2. MichaelH
    Posted 6 years ago #

    Reset your permalink structure to the default permalink structure, and change to the WordPress Default theme. Does it work okay?

  3. 14ner
    Posted 6 years ago #

    When i changed the permalinks to default and the default theme the links at the bottom did work.

  4. jvinch
    Posted 6 years ago #

    What does your loop look like on that page. Are you using wp_query to pull posts in?

  5. Nile Flores
    Yoast Support
    Posted 6 years ago #

    For the default kubrick theme, here is the next and previous link code:

    <div class="navigation">
    <div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>

    I might even be bold to suggest checking out WP-PageNavi
    which I use on most of my sites and it just involves inserting the WP-PageNavi code and customizing your own css for it so it matches your layout.

Topic Closed

This topic has been closed to new replies.

About this Topic