WordPress.org

Ready to get started?Download WordPress

Forums

Next Post Link (5 posts)

  1. 14ner
    Member
    Posted 4 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:
    http://www.example.com/page/2/

    On the page is the first 5 post again.

    The real page 2 link is
    http://www.example.com/category/blog/page/2/

    Any thoughts?

    Thank You,

    14ner

  2. MichaelH
    Member
    Posted 4 years ago #

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

  3. 14ner
    Member
    Posted 4 years ago #

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

  4. jvinch
    Member
    Posted 4 years ago #

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

  5. Nile Flores
    Member
    Posted 4 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>
    </div>

    ---
    I might even be bold to suggest checking out WP-PageNavi
    http://wordpress.org/extend/plugins/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