Select page of pagination on frontpage by date (3 posts)

  1. clampino
    Posted 1 year ago #

    Here's my problem:

    I have a historical diary, which was written a few years ago. All diary-entries should be posts in a wordpress-site. When entering the wordpress-site, the frontpage should show the entry/post (quite easy so far), which was written exactly one year ago, but there should still be the possibility to skip to newer and older posts with the pagination. (which is the big problem).

    To make it more clear, here's an example: The blog has 50 posts divided on 25 subpages to skip through. The post, which was written exactly on year ago can be found on page 3 of 25. When entering the website, page 3 of 25 should be on the frontpage, but still with the possibility to skip to sites with older or newer entries. here's a screenshot, how the frontpage could look like.

    Has anyone an idea how to solve this? Thank you very much!

  2. Chris Hardie
    Posted 1 year ago #

    Hi. I think you can do what you want by creating a custom PHP template file that selects the post you want in the way it queries the posts:


    Then, you could create a page on your site that uses that template file as its template:


    and then specify that page as your front page in the Settings -> Reading admin panel:


    I hope this helps.

  3. clampino
    Posted 1 year ago #

    Thank you very much for your help, chris!

    Unfortunally it doesnt't work or is not exactly what I need. I still don't have the possibility to skip to newer or older posts, because just one post is queried.

    I think it would need a way to query all posts, than select one post and skip automatically to the page, where the post is. Or maybe one could create custom buttons for the next and previous posts or pages. Does anybody know, how could this be done?

Topic Closed

This topic has been closed to new replies.

About this Topic