[resolved] Paged posts on a WordPress Page (5 posts)

  1. michuk
    Posted 9 years ago #

    Sound crazy, but I need to have a Page, that looks just like any other page in the menu, but it displays all the recent articles (posts) from my blog. With links to previous and next entries, etc. How can I achieve this?

    What I did already is:
    I prepared a custom template with a loop that displays all posts
    So far so good... but... the link to previous entries (/mypage/page/2/) shows exactly the same page (the offset is not changed). How do I fix this without coding my own logic for paging (which is certainly not what I want to do)?

  2. michuk
    Posted 9 years ago #

    I see someone else had the same problem: http://wordpress.org/support/topic/70239?replies=4 -- not really resolved. Just to make it clear: I do not want to use categories for that. I need it to be a page cause it has to fit within the page hierarchy I have on my blog. I don't want to do hacking either (pages that redirect to categories, etc). It all else fails, I'll just write my own pagination logic. But I believe there must be a solution to that using the WordPress methods. Is there one?

  3. moshu
    Posted 9 years ago #

    I don't think there is a solution (without a hack). Since Pages are meant to display ONE entry (call it whatever you want; basically one single post flagged "static" in DB), there is no need for pagination in a usual WP setup.

    EDIT. Also, see this - it might be helpful:

  4. michuk
    Posted 9 years ago #


    This is exactly what I wanted. Putting the hack:

    $wp_query->is_page = false;

    before the loops does the trick and the posts are not paginated on a page.

    Thanks a lot!

  5. michuk
    Posted 9 years ago #

    Of course I meant that the posts ARE paginated.

Topic Closed

This topic has been closed to new replies.

About this Topic