WordPress.org

Ready to get started?Download WordPress

Forums

previous_posts_link nor working with query_posts or custom loop (3 posts)

  1. carl-johan
    Member
    Posted 3 years ago #

    Hi all

    I've been searching high and low for this but haven't got any wiser. Basically my site has a Static page set as front_page and the page template includes a custom query where I'd like the visitor to be able to browse the blog content.

    I've had no trouble setting up the query to fetch the posts but the pagination is not working properly. The "next_posts_link" works fine when on the first page but on /page/2/ and on it just links to /page/2/ and not the next page. (As you can see I've set a custom permalink structure, but resetting that does nothing for the pagination)

    The "previous_posts_link" that should show up on /page/2/ and on does not work anywhere.

    I found this blog post on custom loops and pagination, but I've tried it and it has the exact same effect as my own code.

    I bet this kind of functionality is quite common, so I can't see how no-one has solved this before. I bet I'm just googling the wrong things, so if anyone can point me in the right direction I'd be ever grateful!

    Thanks in advance!

    / Carl-Johan

  2. carl-johan
    Member
    Posted 3 years ago #

    No-one? Or is this in the wrong section? Sorry, never no where my questions are supposed to go.

    Thanks!

    / Carl-Johan

  3. creativecoder
    Member
    Posted 3 years ago #

    If you didn't already get a solution, the problem posted here is the same. It should work if you make it a paged query.

    http://wordpress.org/support/topic/previous_posts_link-next-page-re-displaying-same-post-twice

Topic Closed

This topic has been closed to new replies.

About this Topic